in reply to how to sort this?

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