there are two perl arrays ,suppose
@a={1,5,3}
@b={5,2,1}
the numbers in b are related to a as priority - > Id concept as in the PRIORITY OF ID 3 in array a is no 1 in array b,
now i got how to sort array b using
@b = sort ({$a <=> $b}@b); in ascending order
now @b={1,2,5}
what i want to arrange the correspoding ID in a in parallel to b as in array a should be
@a={3,5,1}
please guide regarding this ,looking forward for a favorable response from your side