in reply to Re^3: Shorten the headers of a file and remove empty lines using perl
in thread Shorten the headers of a file and remove empty lines using perl
Indeed - the bit I posted initially will work, but it'll trigger reading the whole file into memory. Probably not a good idea with a 500MB file.
Perl contexts are incredibly clever, but do lead to some interesting gotchas - use of a filehandle in a scalar or array context is one of them.
|
|---|