more useful options | |
PerlMonks |
Re: your obfuscation magic!by brx (Pilgrim) |
on Apr 24, 2012 at 17:12 UTC ( [id://966904]=note: print w/replies, xml ) | Need Help?? |
Nested loops with glob or (very very dirty) regex. First: for (1..12) { for (1..12) { for (1..12) {...}}} same thing (without $num param) than: print join "\n", glob "{1,2,3,4}_{1,2,3,4}_{1_2_3_4}"; Second: for $i (1 .. 12) { for $j ($i+1 .. 12) { for $k ($j+1 .. 12) {...}}} same thing (without $num param) than:
Update: $" ($LIST_SEPARATOR) permits "implicit join" (for an array interpolated in a string)
In Section
Seekers of Perl Wisdom
|
|