in reply to One-liner for Matching a Regex in a Directory of Files
LINE:
while (<>) {
... # your program goes here
} continue {
print or die "-p destination: $!\n";
}
which prints everyline by default, while -n wraps your code in:
LINE:
while (<>) {
... # your program goes here
}
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.
|
|---|