SPUG: scalar(@array)
El JoPe Magnifico
jope-spug at n2h2.com
Thu Apr 13 19:36:40 CDT 2000
On 13 Apr 2000, Alan E. Derhaag wrote:
>> On Thu, 13 Apr 2000, Jeremy Mates wrote:
[...]
>>> for ( @array ) {
>>> $count++ if defined;
>>> }
>>> print $count, "\n";
>>>
[...]
> I think there may be a problem with the `for (@array)' is that
> it will quit at the first undef value..
Nope. Works fine. Only way to drop out of a "for" loop early
is by calling "last". (or "goto" if you're a masochist =)
-jp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe
Email to majordomo at pm.org: "action" spug-list your_address
More information about the spug-list
mailing list