3 # under the terms of the GPL version 2, or any later version, at your
4 # option. See the file README and COPYING for more information.
5 # Copyright 2009 by Don Armstrong <don@donarmstrong.com>.
6 # $Id: perl_script 1432 2009-04-21 02:42:41Z don $
24 --debug, -d debugging level (Default 0)
25 --help, -h display this help
26 --man, -m display manual
34 Debug verbosity. (Default 0)
38 Display brief usage information.
54 my %options = (debug => 0,
60 'debug|d+','help|h|?','man|m');
62 pod2usage() if $options{help};
63 pod2usage({verbose=>2}) if $options{man};
65 $DEBUG = $options{debug};
69 # push @USAGE_ERRORS,"You must pass something";
72 pod2usage(join("\n",@USAGE_ERRORS)) if @USAGE_ERRORS;
75 @rows{@ARGV}=(1) x @ARGV;
79 my $output_newline = 0;
83 my @row = split /[\t\s]/, $_;
88 if (@ARGV and not exists $rows{$row}) {
91 if ($output_newline) {
94 for my $i (0..$#row) {
95 print $i <= $#header ?$header[$i]:'???';
96 print ': '.$row[$i].qq(\n);