in reply to sorting multiple arrays on the criteria of one array

Instead of using three separate arrays, perhaps you could solve your problem by using an array of hashes. For example:

my @data = ( { number => 42, foo => "blah", bar => "hello" }, { number => 67, foo => "red", bar => "green" } ); @data = sort { $a->{number} <=> $b->{number} } @data;

This would sort @data on the number key of each hash, and the foos and bars would go with them.