programming-examples/perl/Statement/last statement inside an if statement.pl

13 lines
161 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl -w
use strict;
while (<STDIN>) {
if ($_ eq "done\n") {
last;
}
print "You entered: $_";
}
print "All done!\n";