in reply to One-liner for Matching a Regex in a Directory of Files
which prints everyline by default, while -n wraps your code in:LINE: while (<>) { ... # your program goes here } continue { print or die "-p destination: $!\n"; }
Note, there is no automatic printing here. So if you use -n instead of -p in your second one-liner, you would have what you want.LINE: while (<>) { ... # your program goes here }
|
---|