Help for this page

Select Code to Download


  1. or download this
    use Capture::Tiny 'tee';
    my $output = tee { system('t=1;while [ 1 -eq 1 ]; do echo hello $t; if
    + [ $t -eq 10 ]; then exit 0; fi; t=$((t+1)); sleep 1; done') };
    print $_ while( <$output> );
    
  2. or download this
    use strict;
    use warnings;
    ...
        }
    }
    print "$0 : done.\n";
    
  3. or download this
    # example use:
    perl a.pl &
    telnet localhost 20000