#variables
my $x=0;
my @keys;
my @holder;
my @array_hash;
my $blank = "-";
my $numerical_value = "num";
my $string_value = "string";
my $filter = "filter";
my $append = "append";
for(my $c = 0; $c <= $num_elements; $c++)
{
if('$hash{$filter[$c]->[4]}' eq '$filter')
{
if (exists($hash{$filter[$c]->[0]}))
{
print "VALUE EXISTS", "\n";
# continue;
if('$hash{$filter[$c]->[3]}' eq '$numerical_value')
{
#process filtering for numerical value
if ((eval "$hash{$filter[$c]->[0]} $filter[$c]->[1] $filter[$c]->[2]"))
{
print OUTFILE $line, "\n";
}
}
if('$hash{$filter[$c]->[3]}' eq '$string_value')
{
#process filtering for string value
if ((eval "'$hash{$filter[$c]->[0]}' $filter[$c]->[1] '$filter[$c]->[2]'"))
{
print OUTFILE $line, "\n";
}
}
}
else
{
print "COLUMN NAME DOES NOT EXIST. CHECK FILTER FILE FOR ANY POSSIBLE ERRORS AND RE-RUN PROGRAM. PROGRAM WILL NOW TERMINATE.", "\n";
exit 0;
}
}
####
column relationship value num_or_string filter_or_append order
a <= 0.3 num filter 1
b = abc string append 3
c <= 0.3 num filter 2
####
if ((eval "'$hash{$filter[$c]->[0]}' $filter[$c]->[1] '$filter[$c]->[2]'"))