Do you know where your variables are? | |
PerlMonks |
perlfunc:undefby gods (Initiate) |
on Aug 24, 1999 at 22:42 UTC ( [id://271]=perlfunc: print w/replies, xml ) | Need Help?? |
undefSee the current Perl documentation for undef. Here is our local, out-dated (pre-5.6) version: undef - remove a variable or function definition
undef EXPR undef
Undefines the value of
EXPR, which must be an lvalue. Use only on a scalar
value, an array (using ``
undef $foo; undef $bar{'blurfl'}; # Compare to: delete $bar{'blurfl'}; undef @ary; undef %hash; undef &mysub; undef *xyz; # destroys $xyz, @xyz, %xyz, &xyz, etc. return (wantarray ? (undef, $errmsg) : undef) if $they_blew_it; select undef, undef, undef, 0.25; ($a, $b, undef, $c) = &foo; # Ignore third value returned Note that this is a unary operator, not a list operator. |
|