![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re: Variable number of foreach loopsby Anonymous Monk |
on Nov 27, 2013 at 15:17 UTC ( #1064635=note: print w/replies, xml ) | Need Help?? |
Generally speaking, you use recursion for this, as BrowserUK did, often calling a separate subroutine (this is where you would put the print-statement) from the innermost iteration. A Perl subroutine can call itself any (reasonable) number of times.
In Section
Seekers of Perl Wisdom
|
|