use warnings; use strict; my $input = ; chomp $input; exit if $input eq 'e' or $input eq 'E'; #### exit if $input =~ /^e$/i;