Advertisement
Guest User

Untitled

a guest
Nov 6th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.28 KB | None | 0 0
  1. use v6;
  2. loop {
  3.     if $*IN.eof {
  4.         say 'reopen';
  5.         $*IN = open($*IN.path, :r);
  6.     }
  7.     my $s = $*IN.Supply;
  8.     react {
  9.         whenever $s -> $buf {
  10.             print $buf;
  11.             LAST {
  12.                 say 'got eof';
  13.             }
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement