in reply to Re: How to perform different sorts on multiple sections of items in the same array
in thread How to perform different sorts on multiple sections of items in the same array
The .* is not required in your match expression nor is the /g. The whole loop can be replaced by:
my @selected = grep {/r/} @array;
Note that neither version of the matching code actually performs a sort so the variable name is more appropriately 'selected' than 'sorted'.
|
|---|