#!/usr/bin/perl use LWP::Simple; use Mac::Glue; print "Downloading Perl Mongers XML file..."; my $data = get( 'http://www.pm.org/groups/perl_mongers.xml' ); $data ? ( print "done\n" ) : ( die "Could not get file!" ); # See Mac::Glue for details on creating the glue, probably: # gluemac /Applications/Google\ Earth.app print "Starting Google Earth..."; my $gEarth = Mac::Glue->new( 'Google_Earth' ); $gEarth ? ( print "done\n" ) : ( die "Could not start Google Earth!" ); while( $data =~ m|(.*?)|gs ) { # I could use an XML parser, but it's too easy to do it myself my( $name, $long, $lat ) = $1 =~ m| (.*?) .*? (.*?) .*? (.*?) |xs; print "Flying to $name\n"; $gEarth->setviewinfo( { 'azimuth' => '0', 'longitude' => $long, 'distance' => '4000', 'latitude' => $lat, 'tilt' => '0' } ); sleep 15; }