Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use strict;
- use warnings;
- my @data = map {chomp;$_+0} <>;
- my @sort_index = map {$_->[1]} sort {$b->[0]<=>$a->[0]} map {[$data[$_],$_]} 0..$#data;
- print map {"$data[$_->[0]] $_->[1]\n"} sort {$a->[0]<=>$b->[0]} map {[$sort_index[$_],$_+1]} 0..$#data;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement