in reply to Comparing a Hash key with a variable (if statement)

Try running your code in debugger (perl -d), setting a breakpoint (b line_number) on the line which contains your eval, running to this line (c), making one step (n) and checking the value of $@. It is possible that some data from your input file form a syntaxically incorrect Perl expression, which causes eval to fail.

Perhaps it will be safer to write a sub which checks the value of $filter[$c]->[1] and makes comparsions based on some if (...) { ... } elsif (...) {...} ... code.

Sorry if my advice was wrong.