#!/usr/bin/perl # Make KML from a list of air waypoints # Copyright : http://www.fsf.org/copyleft/gpl.html # Author : Dan Jacobson -- http://jidanni.org/ # Created On : Sun Nov 10 07:55:07 2013 # Last Modified On: Tue Nov 12 10:44:21 2013 # Update Count : 33 use strict; use warnings FATAL => 'all'; print <<\EOF; 航路 EOF my @coordinates; while (<>) { my @F = split; push @coordinates, "$F[2],$F[1]," . sprintf "%.0f", 27000 * 0.3048; if (eof) { my $c = join " ", @coordinates; my $name = $ARGV; $name =~ s/\..*//; print < $name absolute $c EOF undef @coordinates; } } print <<\EOF; EOF