in reply to how to sort this?
update: and now even simpler:use Sort::Key::Maker iikeysort => qw(integer integer); @sorted = iikeysort { /^(\d+)x(\d+)$/ } @a;
or if the chars between the two numbers can vary:use Sort::Key::Multi 'iikeysort'; @sorted = iikeysort { /^(\d+)x(\d+)$/ } @a;
use Sort::Key::Multi 'isikeysort'; @sorted = isikeysort { /^(\d+)(\w+)(\d+)$/ } @a;
|
---|