in reply to sort an array

the fastest way:
use Sort::Key::Maker iikeysort => qw(integer integer); my @sorted = iikeysort { /(\d+)\#(\d+)$/ } @data;