perlaintdead has asked for the wisdom of the Perl Monks concerning the following question:
hello, monks. My question is:
There is a potentially large amount of data in array @DBread and is return'd. After it is return's is the @DBread empty'd? I'm going to be forking in other parts of the program so i need as little memory used as possible. (i know i can read a file line by line but will do that later.) This is a more academic question more than a practical one
sub readDB{ my $DBtoread = shift; my $FILEREAD; open($FILEREAD, "+<", "./database/$DBtoread"); my @DBread = <$FILEREAD>; close($FILEREAD); return(@DBread); }
thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: return values are undef after return
by Anonymous Monk on Dec 26, 2012 at 11:09 UTC | |
by perlaintdead (Scribe) on Dec 26, 2012 at 11:29 UTC | |
by Anonymous Monk on Dec 26, 2012 at 11:48 UTC | |
by perlaintdead (Scribe) on Dec 26, 2012 at 11:53 UTC | |
by Anonymous Monk on Dec 26, 2012 at 11:59 UTC |
Back to
Seekers of Perl Wisdom