in reply to sorting an array with decimal points

You can also use Sort::Key:
use Sort::Key qw(nkeysort); # the 'n' is for numeric my @sorted = nkeysort { substr $_, 6 } @array;