in reply to Re: Re: Sorting a subset
in thread Sorting a subset
It's a minor point, but as you know every string going into the sort starts with 'A', it is redundant, and much slower, to use substr within the sort block to exclude it.
return sort grep{ substr( $_ , 0, 1 ) eq 'A' } @array;
Will produce the same result more quickly.
In Section
Seekers of Perl Wisdom