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? } }
In reply to nested for loop with assumed scalars by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |