programming-examples/perl/String/chomp in a while statement.pl

5 lines
90 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
while (chomp($input = <>)) {
print "You typed: $input\n" unless $input eq 'L';
}