in reply to joining and sorting arrays
my @list1 = qw(0 1 3); my @list2 = qw(2 4 6 5); my @sortedBiglist = sort { $a <=> $b } (@list1, @list2); my @predefList = (0..$#sortedBiglist); if ("@sortedBiglist" eq "@predefList"){ print "all ok\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: joining and sorting arrays
by strat (Canon) on Dec 05, 2001 at 15:59 UTC |