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()! }
In reply to Re^2: clobbering output
by Anonymous Monk
in thread clobbering output
by bluethundr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |