here is quick solution. See if it is useful for you.
sub split_array { my @not_sorted = qw(Ape Arg Beep Circus); my @sorted = sort {$a cmp $b} @not_sorted; my @A = (); my @trash = (); map{$_ =~/^A.*/ ? push(@A,$_):push(@trash,$_)} @sorted; print "\n",@A,"\n"; print "\n",@trash,"\n"; }
In reply to Re^2: Array splitting
by bimleshsharma
in thread Array splitting
by Hopfi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |