We don't bite newbies here... much | |
PerlMonks |
Re^2: Perl nested loop to print out two arrays n number of times in different patternsby johngg (Canon) |
on Sep 23, 2014 at 09:48 UTC ( [id://1101617]=note: print w/replies, xml ) | Need Help?? |
If instead of using array indexes you use the actual array values is saves the bother of having to save the current outer loop value. Anonymonk makes a useful point about meaningful variable names.
Another way to do this would be to localise the list separator and use glob and the list multiplier in a do block.
I hope this is of interest. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|