Home  |  Linux  | Mysql  | PHP  | XML
From:Dr.Ruud Date:Thu Sep  2 19:47:25 2010
Subject:Re: Recursively filter an array
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
Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
Re: script for shutdown remote machine
Re: Traversing Hash printing two times
AW: Using common object, without passing it around
Re: Traversing Hash printing two times
Re: AW: friend class in perl



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants