in reply to Mind Bending Arrays

I think everyone is looking at this wrong, if I see your question right you want to sort the arrays by their length (if I'm wrong it was fun to do anyways). You can do this with an array or a hash. With an array you should make the filename the first element of the array bellow is an example
@array = (["filename1",1],["filename2",1,2,3],["filename3",3,2]); @array = sort {$#$b <=> $#$a} @array; for (@array){ print $$_[0]; }
and here is an example of using a hash (note you need an array to store the order of the keys)
%hash = ("filename1" => [1], "filename2" => [1,2,3], "filename3" => [3 +,2]); @sortedkeys = sort {$#{$hash{$b}} <=> $#{$hash{$a}} } keys (%hash); print @sortedkeys;
I hope this helps.