Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Clearing an Array of Array's from memory (=undef)

by tye (Cardinal)
on Aug 29, 2003 at 17:57 UTC ( #287779=note: print w/ replies, xml ) Need Help??


in reply to Re: Clearing an Array of Array's from memory
in thread Clearing an Array of Array's from memory

This will make @myarray = undef.

I suspect this is just a case of casual, imprecise language, but you are likely to mislead people with that particular phrasing:

my @myarray = undef; print "\@myarray contains ", 0+@myarray, " elements.\n"; __END__ Produces: @myarray contains 1 elements.
Because     @myarray = undef;
is the same as     @myarray = ( undef );
which isn't at all the same as     undef @myarray;
undef is a function that undefines what is passed to it and then returns a not-defined() scalar value.

                - tye


Comment on Re^2: Clearing an Array of Array's from memory (=undef)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2015-07-28 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls