I've not golfed this, but it's pretty crazy. Tested in Perl 5.10, 5.12 and 5.14, but not sure if the sort algorithm is stable enough to guarantee that it will work in future versions of Perl...
use 5.010; @r = sort { say "perlmonks rule!" and $a } (map {$_ cmp 1} $[ .. $^F) x $^F;
In reply to Re: regex/perl golf: loops
by tobyink
in thread regex/perl golf: loops
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |