in reply to Need Help! Two Dimentional Array Sorting

Hi, and welcome to perlmonks. Before moving on to the main questions, I'll get the mandatory "please use code tags" thing out of the way for displaying code. It helps everything look perty.

Also, you might try dropping  use strict; use warnings; at the top of everything you do. I *think* that would have helped you spot the main problem a little bit sooner.

That all being said, I tried the following, and I got the results you were expecting.

use strict; use warnings; my @Records; open(FILE,"file.txt"); while (<FILE>){ @Records = <FILE>; } @Records = sort {$a cmp $b} @Records; # and now to test. my $i = 0; while ($i <= $#Records){ print "$Records[$i]\n"; $i++; }
Of course you say you're trying to sort a two dimensional array in the subject, but this array isn't two dimensional, so I suspect you're not telling the whole story.

Cheers!