Advertisement
Guest User

multiple EOFs try

a guest
Nov 6th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.26 KB | None | 0 0
  1. use v6;
  2. loop {
  3.     my $s = $*IN.Supply;
  4.     if $*IN.eof {
  5.         say 'eat eof';
  6.         $*IN.read(1)
  7.     }
  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