in reply to How to perform different sorts on multiple sections of items in the same array
Output:use strict; use warnings; my @array = qw(toad frog frig frag crow creep hop); my @sorted; for (@array) { if ( $_ =~ m/.*r/g ) { push( @sorted, $_ ); } } print "$_\n" for sort(@sorted);
EDIT: Missed the point of this might being a homework assignment. apologiescreep crow frag frig frog
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to perform different sorts on multiple sections of items in the same array
by GrandFather (Saint) on Dec 30, 2014 at 04:03 UTC |