map{$_.=" bottles of beer on the wall";$b="Go to the store and buy some more, $_
.\n"if/99/;$_-1||s/s//;/.*r/;print$_<99?"Take one down and pass it around, $_.\n
\n":"","$_, $&.\n",$_<2?$b:""}reverse 1..99
<code>
map {
$_ .= " bottles of beer on the wall";
$b = "Go to the store and buy some more, $_.\n" if /99/;
$_ - 1 || s/s//;
/.*r/;
print $_< 99
? "Take one down and pass it around, $_.\n\n"
: "", "$_, $&.\n", $_ < 2 ? $b
: ""
} reverse 1 .. 99;
</code>
Name:
Anonymous2006-12-14 9:39
perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'