in reply to sorting string
If you'll put your results in an array instead of a bunch of scalars, you can avoid dealing with symbolic references in that. That also makes the sort easy.
@strings = sort { $b <=> $a } @strings;That may not be useful. You'd probably want some record of the original string, and that's probably what you really want to sort. Put the numbers into a hash with the strings as keys.
my %code = map { $_ => calculation($_) } @strings; @strings = sort { $code{$b} <=> $code{$a} } keys %code;
After Compline,
Zaxo
|
|---|