Mega Code Archive
Getting Input in Perl Scripts
# Note the extra space after the question mark.
print "What is your favorite scripting language? ";
$lang = ;
chomp($lang);
if ( $lang eq "perl" ) {
print "you chose perl!\n";
} else {
print "$lang ";
}