in reply to Re^2: if (defined @arr) problem
in thread if (defined @arr) problem
> Still, testing definedness of an array is a very bad idea. > Try running this code first: > > @a = qw(a b c); > > and now you'll see, the array will be defined (and empty).
Hmm, i get "defined: yes" and "size: 3" ...
@a = qw/a b c/; printf "defined: %s\nsize: %d\n" , defined @a ? 'yes' : 'no' , scalar @a ;
... what did i miss?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: if (defined @arr) problem
by bart (Canon) on Dec 15, 2005 at 17:40 UTC | |
by parv (Parson) on Dec 15, 2005 at 18:42 UTC |