GetOptions(\%runconfig, "load=s" => \&loadAttributeDescriptions, "loadconfig=s" => \&loadconfig, "dumpconfig=s" => \$dumpconfig, "tables=s" => \$tables, "prec:i" => \$precision, "decorate" => \$decorate, "i=s@", # include a nominal field. "arff", # arff file [data mining] "max:i", # examine file to this length "quiet", # do not spit out csv "filter=s" => \&addfilter, "cp=s" => \&addcp, # array of [ant [ dependents ] ] "cptformat=s", # cp table format "prune", # get rid of 0 info columns "help" => \$help, "man" => \$man ) or pod2usage(-verbose=>1) && exit(1); #### cptplus.pl --cp="charm|perlmonk,cyberpunk,neovictorian" #### sub addcp{ my $cpstring = $_[1]; $cpstring =~ s/^([A-Za-z\-\_0-9]+)\|//; my $antecedent = $1 || return; my @dependents = split(/,/, $cpstring); my @cptrequest = ($antecedent, \@dependents); push @{$runconfig{"cp"}},(\@cptrequest); }