in reply to sorting an array mix

Presuming that "St" is a static prefix just remove it and compare numerically; if it's not, then break your items into pieces and do a multi-comparison sort comparitor.

my @sorted = sort { substr( $a, 2 ) <=> substr( $b, 2 ) } @g;

And search for "schwartzian transform" for hints how to do so efficiently.

The cake is a lie.
The cake is a lie.
The cake is a lie.