- or download this
some_script.pl file1 file2
- 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: ...
- or download this
my $prefix = 1;
...
print "$prefix: $_";
$prefix++ if ( eof );
}
- or download this
cat file1 file2 | some_script.pl
# or something less mundane:
grep "target string" file1 | cat - file2 | some_script.pl
- or download this
echo "____STREAM_BOUNDARY____" > bndry
grep "target string" file1 | cat - bndry file2 | script.pl