Syntactic Confectionery Delight | |
PerlMonks |
Re: Re: using undef on a arrayby Anarion (Hermit) |
on Oct 31, 2001 at 15:00 UTC ( [id://122321]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|