Best way to avoid “isn't numeric in numeric eq (==)”-warning
#!/usr/bin/env perl use warnings; use 5.12.2; my $c = 'f'; # could be a number too if ( $c eq 'd' || $c == 9 ) { say "Hello, world!"; } What is the best way, to avoid the 'Argument "f" isn't numeric in numeric eq (==) at ./perl.pl line 7.'-warning? I suppose in this case I could use "eq" two times, but that doesn't look good. Not sure why you want to avoid the warning. The warning is telling you that there's a potential problem in your program. If you're going to compare a number with a string that contains unknown data, then you're either going to have to use 'eq' for the comparison or clean