in reply to Re: help with array of arrays
in thread help with array of arrays

You need to use strict and warnings. You are trying to compare two things that aren't actually numbers (as they have a comma in them). If you had warnings on you'd get something like:
Argument "1,900" isn't numeric in sort at sort.pl line 7, <DATA> line +3. Argument "4,900" isn't numeric in sort at sort.pl line 7, <DATA> line +3. Argument "1,333,987" isn't numeric in sort at sort.pl line 7, <DATA> l +ine 3.
You also don't need to use $main::a and $main::b as $a and $b are special and are globals.

You probably want to do something like:

@sorted = sort {$a->[2] <=> $b->[2]} map { s/,//g; $_ } @sorted;
You might want to look up the Schwartzian Transform or perldoc sort.

gav^