Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

return values are undef after return

by perlaintdead (Scribe)
on Dec 26, 2012 at 10:39 UTC ( #1010353=perlquestion: print w/ replies, xml ) Need Help??
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!

Comment on return values are undef after return
Download Code
Re: return values are undef after return
by Anonymous Monk on Dec 26, 2012 at 11:09 UTC
      so after reading that tut i am confuzzled as to whether i should be undef'ing the array or any variables in general

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1010353]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-07-25 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls