in reply to Re^6: Calculate aircraft headings from GPS data for google kml display
in thread Calculate aircraft headings from GPS data for google kml display
You're slurping the entire file into an array:
open(INPUT, $infile); my @lines = <INPUT>; close(INPUT);
Which means by the time you reach where I loaded the header line:
my @headers = split ' ', do{ my $raw = <INPUT>; $raw =~ tr[",][ ]; $ra +w }; #"
There is nothing left to read.
Either shift the first line off of the array:
my @headers = split ' ', do{ my $raw = shift @lines; $raw =~ tr[",][ ] +; $raw }; #"
Or don't slurp the file and revert to using while.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Calculate aircraft headings from GPS data for google kml display
by hujunsimon (Sexton) on Jun 26, 2014 at 15:01 UTC |