-
-
Save dakkar/e96dcdb3c0fc6c4ea138125ed138b259 to your computer and use it in GitHub Desktop.
raku fs notification test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Path::Tiny; | |
my $o = path('/tmp/foo/file')->openw; | |
$o->autoflush(1); | |
while (1) { | |
print $o '1'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6.d; | |
react { | |
whenever '/tmp/foo'.IO.watch() -> $item { | |
} | |
whenever signal(SIGINT) { | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment