Skip to content

Instantly share code, notes, and snippets.

@dakkar

dakkar/fill.pl Secret

Created December 12, 2023 13:16
Show Gist options
  • Save dakkar/e96dcdb3c0fc6c4ea138125ed138b259 to your computer and use it in GitHub Desktop.
Save dakkar/e96dcdb3c0fc6c4ea138125ed138b259 to your computer and use it in GitHub Desktop.
raku fs notification test
#!/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';
}
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