%a = map {$_ => ++$i} a..z; chomp($_ = ); exists $a{$_} ? print "$a{$_}\n" : print "Everything else\n";