I have an array in perl that contains about 200 indexes that are for a csv file. It likes like the lines below:
46.9234784633993,Springwood Drive,Naples,FL
89.7786182217159,W 8th St,Lakeland,FL
I want to sort them by that number before the first comma. I tried using just sort, but sometimes the numbers get into the hundreds and thousands and it just sorts all those in the 1's. Then a numerical sort doesnt like it since they are not numerical entries
I tried this
my @sortedDistances = sort{ $a <=> $b }(@completedDistances);
and
my @sortedDistances = sort(@completedDistances);