laziness, impatience, and hubris | |
PerlMonks |
Problem when comparing strings as opposed to numerical valuesby dkhalfe (Acolyte) |
on Jul 19, 2012 at 19:03 UTC ( [id://982690]=perlquestion: print w/replies, xml ) | Need Help?? |
dkhalfe has asked for the wisdom of the Perl Monks concerning the following question: Hello all. For reference:
My program reads in this filter file and stores each value in an array.
Whats going on: If the hash of column a evaluates to less than or equal to the value specified in the filter file (.03), continue. This part works. Then, if the hash of column b evaluates to 'equal' (== or eq; I have tried both meaning I have changed the values for column b in the filter file to both '==' and 'eq' and tried to run the program that way but no luck) the value specified in the filter file (abc), continue. This part does not work - Any comparison/evaluations of numerical values works and I can print the results to an output file. However, when I try to do this same comparison/evaluation with strings, wrong output (if any) is printed to the output file. What is a solution to compare/evaluate a string with the code I have already written?
Thank you!
Back to
Seekers of Perl Wisdom
|
|