#!/usr/bin/perl use Getopt::Long qw(:config no_auto_abbrev no_bundling); use Pod::Usage; my ($help,$man,$fs,$o); GetOptions( "help|h|?" => \$help, "man" => \$man, "fs=s" => \$fs, "ouput|o=s" => \$o, ) or die "Specify the --help (or -?) option for usage information.\n"; ## "out|O:s" => \$multiout, use strict; use Text::TabDB; use utf8::all; my $esq = shift or die("Usage: $0 schema file*\n"); Text::TabDB::tabproj( {($fs ? (fs=>$fs):()), ($o ? (o => $o):())},$esq,@ARGV); __END__ =head1 NAME tabproj - textual relational databases project =head1 SYNOPSIS tabproj [-fs=#] sckema tab* > f iconv -f latin -t utf8 tab1 | tabproj 'f1:f3:f9' tabproj 'name::age' f (get fields named name and age ) tabproj '_1::_4' f (get fields 1 and 4) =head1 DESCRIPTION input should be Unicode UTF8. If no input is provided, stdin is used. =head1 FORMATS each input table: country:capital first line - name of the fields Portugal:Lisboa tuple 1 France:Paris tuple 2 Spain:Madrid tuple n =head1 skema syntax fieldK:fieldj:... (if FS = ":") =head1 Options -fs='!' changes the field separator (default calculated from schema (first line) or ":") -o=file output file =head1 AUTHOR J.Joao Almeida, jj@di.uminho.pt =head1 SEE ALSO perl(1). =cut