title: How to return a sorted list's index in Perl?
body: <p>Say, I have a list: </p>
  
  <pre><code>@abc = (5,7,6,2,7,1);
  </code></pre>
  
  <p>I have to obtain a sorted list as well as a sorted list index. So the output will be:</p>
  
  <pre><code>@sorted_list = (7,7,6,5,2,1);
  @sorted_list_index = (1,4,2,0,3,5);
  </code></pre>
  
  <p>I am also looking a very efficient approach for this problem, since I am actually dealing with a long list with 2^16 entries. </p>