sub by_string { my $file = shift; local *IN, $/; open( IN, $file ) or die "Cannot open '$file': $!"; return <IN>; }
Access each element with substr. Memory savings? Several bytes per character, because Perl doesn't have to create a new SV for each character.
In reply to Re: Eating RAM problem
by chromatic
in thread Eating RAM problem
by TheFifthDeuce
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |