>>>>> "GL" == Greg London <Greg> writes:
GL> Oh god. I'm digging through what might be on the order of.a
GL> hundred thousand lines of perl code on a system. The file that
GL> snippet came from is over ten thousand lines long. My brain is
GL> about to implode.
better that it implode instead of explode all over the list. cleaning up
brain matter from mail servers is not a fun job.
besides, using that technique to determine if an array (or array ref) is
empty or not is clunky and slow. there is no need to compare it to any
value as 0 is a fine boolean whereas -1 is not. the correct way is just
if ( @array ) or ( @{$aref} ). nothing else is needed. it is clearer and
also faster.
uri
--
Uri Guttman ------ [email protected] -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm