I am trying to read all latitude and longitude values from NWS warning files like this: http://www.weather.gov/data/SGF/SVRSGF
The latitude/longitude values always appear at the bottom of the warning, between "LON" and "TIME". I had been using the regular expression: $stwarn =~ m/LON(.*)\nTIME/ but it doesn’t seem to work for all warnings.
Can anyone offer any better suggestions? Thanks!













That’s probably because there’s not always a newline (\n) between the two, or it might sometimes be a carriage return (\r) instead of a newline. Try removing the newline character, or using an alternating expression for newline or carriage return.