Mega Code Archive

 
Categories / Perl / String
 

Chomp in a while statement

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