Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering if there were a way to nest two for loops like that. For examplefor (1 ... #$array) { print $_; }
Any thoughts?for ( 1 ... $#array) { for (1 ... $#other_array) { print $_; print $_2; # ie the second assumed scalar? } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: nested for loop with assumed scalars
by Aristotle (Chancellor) on Aug 07, 2004 at 19:38 UTC | |
|
Re: nested for loop with assumed scalars
by duff (Parson) on Aug 07, 2004 at 20:10 UTC | |
|
Re: nested for loop with assumed scalars
by strat (Canon) on Aug 08, 2004 at 09:28 UTC | |
by Jenda (Abbot) on Aug 08, 2004 at 23:52 UTC |