What I need to do is sort the data in the second array in ascending
order and then print out with the corresponding elements from the
first array.
It seems to work, apart from being in descending order, but my
main problem is perl complaining about a depreciated use of split @
Thanks for any help!
my @first = qw(high medium low apex);
my @second = qw(100.00 50.50 34.25 23.99);
my $idx = -1;
my @result = map {$idx ++; $second[$idx].'~'.$_} @first;
print "merge result:\n";
print join "\n", @result;
print "\n";
print sort {split( "~", $a) <=> split( "~", $b)} @result;
Martin van-Eerde Dip. Comp. (Open)
Senior Analyst Programmer
==========================================================