Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Welcome to the Monastery
 
PerlMonks  

Re: Re: using undef on a array

by Anarion (Hermit)
on Oct 31, 2001 at 10:00 UTC ( [id://122321]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: using undef on a array
in thread using undef on a array

The last one is easy to understand, but if i try to asing a undef value to $#a it is not modified:

perl -le 'use strict;my @a=("a");$#a=undef;print "Defined" if defined @a;print @a'
Defined
a

But whats the meaning of defined, what exactly do the undef @a,what exatly perl do? If i write $#a=-1 i'm clearing all and have no values, the both, 1 and 2 have no content, thats why it prints that they have 0 elements, buf one its undefined, but still avaliable, sorry if i dont understand what it means with defined, you say it still exists ... in both cases exists and are emptys.

$anarion=\$anarion;

s==q^QBY_^=,$_^=$[x7,print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://122321]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.