#!/usr/local/bin/perl

use strict;
use warnings;

use Astro::SIMBAD::Client;
use Data::Dumper;

foreach (@ARGV) {
    print Dumper (parse ($_));
}

sub parse {
    my $fn = shift;
    -e $fn or die "Error - File $fn does not exist.\n";
    open (my $fh, '<', $fn) or die <<eod;
Error - Failed to open $fn
        $!
eod
    local $/ = undef;
    my $data = <$fh>;
    [Astro::SIMBAD::Client::Parse_VO_Table ($data)];
}
__END__

Copyright 2006 by Thomas R. Wyant, III (F<wyant at cpan dot org>).
All rights reserved.

This script is free software; you can use it, redistribute it
and/or modify it under the same terms as Perl itself. Please see
L<http://perldoc.perl.org/index-licence.html> for the current licenses.

