David Steuber on 26 Nov 2003 15:29:46 -0500


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

Re: Why can't an array element be used as the index var in foreach?


On Tue, Nov 25, 2003 at 01:38:33PM -0500, Walt Mankowski wrote:
> On Tue, Nov 25, 2003 at 01:31:54PM -0500, David Steuber wrote:
> > I even tried the more verbose 'for ($c[0] = 0; $c[0] < 5; $c[0]++)' with
> > no success.  Perl would have none of it.
> 
> Then you must have some other bug in your program, since that's
> exactly what I *did* have to do to work around the problem, and it
> worked fine for me.

Ok, I typed it in again and it worked just fine using the C style for.
I guess I flubbed something and was just not paying attention as to
what.

-- 
David Steuber           |  telco:610.436.1677
302 E Marshall St       |  http://www.david-steuber.com/
Apt 612                 |  (do ((a 1 b) (b 1 (+ a b)))
West Chester, PA 19380  |      (nil a) (print a))
-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**