while (chomp($input = <>)) { print "You typed: $input\n" unless $input eq 'L'; }