![]() |
|
P is for Practical | |
PerlMonks |
using undef on a arrayby Anarion (Hermit) |
on Oct 31, 2001 at 14:21 UTC ( [id://122314]=perlquestion: print w/replies, xml ) | Need Help?? |
Anarion has asked for the wisdom of the Perl Monks concerning the following question:
Recently in a perl list someone ask how to clean an array,
then i said @a=() or $#a=-1, but you can use undef @a too.
But i dont know what exatly do undef,heres and example to show what i mean: Defined 0 Defined 0 Defined 1 Its still avaliable and strict dont warn it, then its not undefined, perhaps it is only memory deallocated, i dont know ... I read that i shouldnt use undef on arrays on perldoc -f defined but i want to know what undef do :) $anarion=\$anarion; Edit Masem - CODE tags s==q^QBY_^=,$_^=$[x7,print
Back to
Seekers of Perl Wisdom
|
|