You can dodge the zeros issue and make it a bit more effiecient using pack:
@g = qw(St1 St10 St2 St12 St6 St8);; print for map{ substr $_, 4 } sort map{ pack 'NA*', m[(\d+)], $_ } @g; +; St1 St2 St6 St8 St10 St12
In reply to Re^2: sorting an array mix
by BrowserUk
in thread sorting an array mix
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |