in reply to Lewis Carroll's Code

if ( $choice =~ /e/i ) { is not a good choice for single letter input, because you a checking a whole line. Thus if I as user write "v7dhu" because her hand fell unto the keyboard it would be read as if I wanted to decode something. Use if ($choice eq 'e' || $choice eq 'E') { instead (remember to chomp $choice), this also makes it clear that you are looking for specific input, when someone else is reading your code...

T I M T O W T D I