Help for this page

Select Code to Download


  1. or download this
    some_script.pl  file1  file2
    
  2. or download this
      In a "while (<>)" loop, "eof" or "eof(ARGV)" can be used to
      detect the end of each file, "eof()" will only detect the end
      of the last file.  Examples: ...
    
  3. or download this
    my $prefix = 1;
    
    ...
        print "$prefix: $_";
        $prefix++ if ( eof );
    }
    
  4. or download this
      cat file1 file2 | some_script.pl
    
    # or something less mundane:
    
      grep "target string" file1 | cat - file2 | some_script.pl
    
  5. or download this
     echo "____STREAM_BOUNDARY____" > bndry
     grep "target string" file1 | cat - bndry file2 | script.pl