The second use of <> should just repeat the list of input files.#!/usr/local/bin/perl -w use strict; my @args = @ARGV; print "-----PASS 1-----\n"; while(<>){ print; } @ARGV = @args; print "-----PASS 2-----\n"; while(<>){ print; }
Update
tye (below) just reminded me of another weakness with this -
the files could have changed between passes! Not good... unless
you want to check for changes in the passes?
In reply to RE: Using in multiple passes
by Albannach
in thread Using in multiple passes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |