get the location regex right and use it everywhere
[spider.git] / perl / DXBearing.pm
index b7101a53ce627ad1f535a413784ff98e6021a2a4..e7736f8a138d64a367865bce605631389f96f861 100644 (file)
@@ -110,7 +110,7 @@ sub bdist
 # turn a lat long string into floating point lat and long
 sub stoll
 {
-       my ($latd, $latm, $latl, $longd, $longm, $longl) = $_[0] =~ /(\d{1,2})\s+(\d{1,2})\s*([NnSs])\s+(\d{1,3})\s+(\d{1,2})\s*([EeWw])/;
+       my ($latd, $latm, $latl, $longd, $longm, $longl) = $_[0] =~ /(\d{1,2})\s+(\d{1,2})\s*([NnSs])\s+(1?\d{1,2})\s+(\d{1,2})\s*([EeWw])/;
        
        $longd += ($longm/60);
        $longd = 0-$longd if (uc $longl) eq 'W';