Help for this page

Select Code to Download


  1. or download this
    my $cmd = '/usr/bin/strings /etc/passwd';
    open my $handle, "$cmd |" or die "open: $cmd: $!\n";
    ...
    }
    
    close $handle or die "$cmd; exit code($?): $!\n";
    
  2. or download this
    #!/usr/bin/perl
    # vi:ts=4 sw=4 et:
    ...
    }
    
    __END__
    
  3. or download this
    $ perl read2.pl 
    /bin/cat: 100/100 successful!
    /usr/bin/less: 38/100 successful!
    /bin/more: 31/100 successful!
    /usr/bin/strings: 40/100 successful!
    
  4. or download this
    $ perl read2.pl 
    /bin/cat: 100/100 successful!
    /usr/bin/less: 16/100 successful!
    /bin/more: 26/100 successful!
    /usr/bin/strings: 32/100 successful!
    
  5. or download this
    $ perl read2.pl 
    /bin/cat: 35/100 successful!
    /usr/bin/less: 0/100 successful!
    /bin/more: 41/100 successful!
    /usr/bin/strings: 37/100 successful!
    
  6. or download this
    $ perl read2.pl 
    /bin/cat: 100/100 successful!
    /usr/bin/less: 100/100 successful!
    /bin/more: 100/100 successful!
    /usr/bin/strings: 100/100 successful!