in reply to Re^3: I wrote a script to grep
in thread I wrote a script to grep
Is this line working with use strict; and use warnings;?open $my_file, '<', $fn or die "Cannot open $fn: $!\n";
I'd assume you wanted to have rather:
But then, you also have to change the while loop and your close statement.open my $file, '<', $fn or die "Cannot open $fn: $!\n";
I would also recommend that you localize $/ in a block before changing its value (although it may not be necessary in such a short script).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: I wrote a script to grep
by mr_mischief (Monsignor) on Jul 22, 2014 at 18:01 UTC |