in reply to Re: help with array of arrays
in thread help with array of arrays
You also don't need to use $main::a and $main::b as $a and $b are special and are globals.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 probably want to do something like:
You might want to look up the Schwartzian Transform or perldoc sort.@sorted = sort {$a->[2] <=> $b->[2]} map { s/,//g; $_ } @sorted;
gav^
|
|---|