add the Geo::TAF module
[spider.git] / Geo / TAF / example / cmd_metar.pl
1 #!/usr/bin/perl
2 #
3 # This example takes METARs from the standard input and 
4 # prints them out in a readable form
5 #
6
7 use strict;
8 use Geo::TAF;
9
10 while (<STDIN>) {
11         chomp;
12         next if /^\s*$/;
13         next unless Geo::TAF::is_weather($_);
14         my $t = new Geo::TAF;
15         $t->metar($_);
16         print $t->raw, "\n\n";
17         print $t->as_string, "\n\n";
18 }