in reply to perl -pl with next?
-p causes Perl to assume the following loop around your program, which makes it iterate over filename arguments somewhat like sed: LINE: while (<>) { ... # your program goes here } continue { print or die "-p destination: $!\n"; }
So the next statement makes continue block executed. I think -n with explicit print is the better solution. Or maybe you can try a $_="" (untested, just a thought).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl -pl with next?
by hv (Prior) on Jan 27, 2005 at 09:26 UTC | |
by deibyz (Hermit) on Jan 27, 2005 at 09:30 UTC |