http://qs321.pair.com?node_id=499651


in reply to Getopt, regexen, and newlines

Just a note:

$contents = do{local $/; <FILEHANDLE>;};

Should use less memory and (I believe) run faster than:

@contents = <FILEHANDLE>; $contents = join "", @contents;

P.S. see perlvar for info on $/


They say that time changes things, but you actually have to change them yourself.

—Andy Warhol