UCS::DS::Format - ASCII-format data set or subset
use UCS::DS::Memory;
use UCS::DS::Format;
$ds = new UCS::DS::Memory $filename; # needs in-memory representation
$formatter = new UCS::DS::Format $ds; # formatter object for data set $ds
$formatter->digits(6); # number of significant digits
$formatter->mode("table"); # only mode so far
$formatter->pagelength(50); # print in pages of 50 rows each
$formatter->pagelength(undef); # print as single table
$formatter->vars($pattern, ...); # select variables that will be shown
$formatter->print; # print formatted table on STDOUT
$formatter->print($filename); # write to file or pipe
This module provides a convenient method to format data sets as ASCII tables, which can then be used for viewing and printing. The formatter has to be applied to the in-memory representation implemented by the UCS::DS::Memory module. Its output is printed on STDOUT by default, but it can also be redirected to a file or pipe.
DOUBLE
). $n must be at least 2.table
prints the data set in the form of a simple ASCII table with column headers. It is the only supported mode so far.See also the manpage of the PRINT utility, which is based on the UCS::DS::Format module.
Copyright 2004 Stefan Evert.
This software is provided AS IS and the author makes no warranty as to its use and performance. You may use the software, redistribute and modify it under the same terms as Perl itself.