in reply to Using in multiple passes
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Using in multiple passes
by merlyn (Sage) on Oct 25, 2000 at 18:52 UTC |