in reply to RE: Parsing a file one line at a time
in thread Parsing a file one line at a time
local is 'sometimes' the 'right' way.open(FILE1, $ARGV[0]) || die "Error: $!\n"; { local $/; #value is restored at end this block undef $/; #'slurp mode' @lines = <FILE1>; #slurp all lines } #$/ is as back 'to normal', so nothing unexpected happens later
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) RE(3): Parsing a file one line at a time
by Ovid (Cardinal) on Jul 23, 2000 at 21:17 UTC |