in reply to Can I catch exceptions

Another option besides modifying warn is simply to check for the number-ness of the values before using the == operation, such that you can control what warnings are printed. For example:
if( $num1 !~ /^\d+$/ ) { warn "First value is not a number"; } elsif ( $num2 !~ /^\d+$/ ) { warn "Second value is not a number"; } else { my $result = ( $num1 == $num2 ); }
Note that the regex used above checks for whole numbers; several more useful regexes for other number types are listed in perlfaq4, under the question "How do I determine whether a scalar is a number/whole/integer/float?"


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain