in reply to Re: clobbering output
in thread clobbering output
Because ``<>'' never does an explicit close, line numbers increase across ARGV files (but see examples under eof()).
The OP seems to want to process multiple files from the command line. The relevant example from the entry for eof is:
# reset line numbering on each input file while (<>) { next if /^\s*#/; # skip comments print "$.\t$_"; } continue { close ARGV if eof; # Not eof()! }
|
|---|