When I read your question, I thought you would have a problem with equal strings and numeric values. Consider the following case:
use strict;
use warnings;
print("What is the meaning of life, the universe and everything? ");
chomp(my $response = <STDIN>);
if ( $response == 42) {
print "correct answer\n";
} else {
print "Wrong answer\n" ;
}
if. - , family, , . ~~ - smart match, Perl. ( " " ). chomp.