programming-examples/perl/Statement/Using unless with regular expression.pl

10 lines
108 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
while (<>) {
chomp;
unless (/^q/i) {
print;
} else {
exit;
}
}