So far everyone has sorted your numbers, which isn't what you asked for. Try this:
it prints:my @nums= <STDIN>; my @index= sort { $nums[$a-1] <=> $nums[$b-1] } 1..@nums; print join "\n", @index, '';
just like you wanted. - tye1 2 4 3 5
In reply to Re: Sorting numbers (not)
by tye
in thread Sorting numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |