Astro::STSDAS::Table::Simple - simple interface to STSDAS format tables
use Astro::STSDAS::Table::Simple qw( read_table ); $data = read_table( $file, { Input => 'Binary', Output => 'RowHash' } );
Astro::STSDAS::Table::Simple provides a very simple interface to STSDAS format tables.
$data = read_table( $file, \%options );
This slurps an entire table into memory. The options hash is used to indicate what type of input table it is (either binary or text) and how to structure the output. Options are specified as keys in the hash. For example:
$data = read_table( $file, { Input => 'Binary', Output => 'RowHash' } );
The input file type. It is either Binary or Text. Currently only Binary is supported.
Binary
Text
This can take one of the following values:
The data are returned as a reference to an array containing hashrefs, one per row. The hash keys are the column names.
For example, to access the value of column time in row 3,
time
$data->[2]{time}
The data are returned as a reference to an array containing arrayrefs, one per row.
$data->[3][9]
The data are returned as a reference to a hash, one element per column. The keys are the column names, and the values are arrayrefs containing the data for the columns.
$data->{time}[2]
The data are returned as a reference to an array, one element per column. The array elements are arrayrefs containing the data for the columns.
$data->[9][3]
In all cases, vector elements are returned as references to arrays containing the vectors.
This software is released under the GNU General Public License. You may find a copy at
http://www.fsf.org/copyleft/gpl.html
Diab Jerius ( djerius@cpan.org )
To install Astro::STSDAS::Table::Base, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Astro::STSDAS::Table::Base
CPAN shell
perl -MCPAN -e shell install Astro::STSDAS::Table::Base
For more information on module installation, please visit the detailed CPAN module installation guide.