#!/usr/local/bin/perl # # Retrieve current data from Manned Space Flight web page # use strict; use warnings; use Astro::SpaceTrack; use Getopt::Long; our $VERSION = '0.001'; my %opt; my $usage = <new (with_name => $opt{name}); # Retrieve our data. We have to pass '-all' to get all data, # or no arguments to get the current data. my $rslt = $st->spaceflight ($opt{all} ? '-all' : ()); # We die if we failed to retrieve the data. $rslt->is_success or die $rslt->status_line; # If we're still alive, we print the data we got back. print $rslt->content;