use strict; use warnings; my $string = 'abcd'; my $number = 0; if ($string == $number) { print "equal\n" } else { print "different\n" }