Rob Dixon schreef:
> my $contents = do {
> open my $fh, $source_file or die $!;
> local $/;
> <$fh>;
> };
That has the file's contents in memory twice. This is leaner:
my $contents;
{
open my $fh, $source_file or die $!;
local $/;
$contents = <$fh>;
};
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
