Here is one way to sort the arrays by age and then by income:
@sorted = sort { $age[$a] <=> $age[$b] || $income[$a] <=> $income[$b] } @index;
This uses the spaceship operator (<=>) to first compare the ages, and if they are equal, then compares the incomes to break the tie.