[Israel.pm] Testing for non-empty array
Levenglick Dov-RM07994
DovL at freescale.com
Mon Apr 11 07:04:47 PDT 2005
It is redundant however it makes it clear that what is returned is an array
Best Regards,
Dov Levenglick
The information contained in this email is classified as:
[ ] General Business Information
[ ] Freescale Internal Use Only
[ ] Freescale Confidential Propriety
[x] Personal Memorandum
-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On Behalf Of Mikhael Goikhman
Sent: Monday, April 11, 2005 3:45 PM
To: Perl in Israel
Subject: Re: [Israel.pm] Testing for non-empty array
On 11 Apr 2005 11:53:26 +0300, Levenglick Dov-RM07994 wrote:
>
> Lets not forget if (scalar $obj->method)
This is quite redundant and exactly equivalent to: if ($obj->method).
Only guaranteed to work if a function returns a list, even on !wantarray.
Regards,
Mikhael.
--
perl -e 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e'
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl
More information about the Perl
mailing list