Could you put it into a Tie::Array::Pack or Tie::Array::Packed array and just use sort?
That does not work as you expect, sort unpacks the array before sorting it.
Though, Tie::Array::Packed has a sort method that can be used for that. For instance:
(it just calls Sort::Packed under the hood)tie my @p, 'Tie::Array::Packed::Integer'; push @p, $_ for (.....); tied(@p)->sort;
In reply to Re^2: Sorting packed arays
by salva
in thread Sorting packed arays
by shaolinMonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |