You'd take his for loop and instead of putting the stuff in a hash you'd just do something with the number right then and there!
for (1 .. 25) {
my $value = param("q$_");
print "Value #$_ = $value\n";
}
| [reply] [d/l] |
| [reply] |
foreach $key( map { $_->[1] }
sort { $a->[0] <=> $b->[0] }
map { m/q(\d+)/; [ $1, $_ ] }
keys %hash ){
print "$key : $hash{$key}\n";
}
(untested)
--chargrill
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s
+plit//=>$*
){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$#
+C]=$/;($#C
>$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^
+$$C[$%++]}
| [reply] [d/l] [select] |