-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).
In reply to Re: perl -pl with next?
by deibyz
in thread perl -pl with next?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |