[Israel.pm] Testing for non-empty array

Levenglick Dov-RM07994 DovL at freescale.com
Mon Apr 11 01:53:26 PDT 2005


Lets not forget if (scalar $obj->method) 

 
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 Issac Goldstand
Sent: Monday, April 11, 2005 4:12 AM
To: Perl in Israel
Subject: [Israel.pm] Testing for non-empty array


Can people suggest elegant ways to see if a method call of an object
($obj->method) returns a non-empty array (or conversely, returns an
empty one)?
Everything I try just seems messy - too many typecasting sort of things,
since that darn $ is there...
Or maybe I'm just not thinking at 4AM ;-)

  Yitzchak
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl



More information about the Perl mailing list