[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] While versus foreach



At 12:53 PM -0500 5/14/97, Mark Manning/Muniz wrote:
[snip]
>
>I know - "no duh" to some people.  But I've been using the
>WHILE loop set-up for quite a while without this biting
>me.  Used up all of the swap space on the computer though
>today.  :-/  So this is a sporadic thing in Perl.  Anyone
>have any idea why _some_ of the time it works and _some_ of
>the time it doesn't?  (ie: Why does it only not work
>sporadically?)

You got lucky?

Seriously,
	while (@theList)
isn't going to set $_ like
	while (<>)
or
	foreach (@theList)
does. Also foreach iterates over the elements in @theList.
>

yours,
Michael Houghton

------------------------------------------------------------------
Michael and MJ Houghton   | Herveus d'Ormonde and Megan O'Donnelly
herveus@access.digex.net  | White Wolf and the Phoenix
Bowie, MD, USA            | Tablet and Inkle bands, and other stuff
                          | http://www.access.digex.net/~herveus/



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch