On 2010-09-02 21:15, Chas. Owens wrote:
my $string = do {
open my $fh, "<", "filename" or die $!;
local $/;
<$fh>;
};
To make it use less memory, write it like this:
my $string;
{
open my $fh, "<", "filename" or die $!;
local $/;
$string = <$fh>;
};
--
Ruud
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
