[Israel.pm] defined @array
Yossi.Itzkovich at ecitele.com
Yossi.Itzkovich at ecitele.com
Wed Nov 17 02:07:03 PST 2004
Hi,
I have a function that returns a list. The list could be empty. When I
have an error I want to return undef.
In the calling code I want to know if the list is empty or I got undef, so
first I check:
if (defined @array)....
But -w gives me :
"defined(@array) is deprecated at... May be you should just omit the
defined ?"
But then I will not be able to differ between empty list and undef, isn't
it ?
Yossi
More information about the Perl
mailing list