Help for this page

Select Code to Download


  1. or download this
    my $file = $ARGV[0];
    
    ...
    while (<IN>) {
       print($_); # do stuff
    }
    
  2. or download this
    my $file = @ARGV ? $ARGV[0] : '-';
    
    ...
    while (<IN>) {
       print($_); # do stuff
    }
    
  3. or download this
    use FileHandle;
    
    ...
    while (<$fh_in>) {
       print($_); # do stuff
    }