PracticeDev/study_perl/re/5re.pl

10 lines
182 B
Perl
Raw Normal View History

2022-12-20 17:31:11 +08:00
#!/usr/bin/perl
foreach (<STDIN>){
chomp;
if (/gao/){
print "$_ was matched 'gao'\n";
}
}
# echo -e 'hello gao\n sdfj \ngao gao gao \ngao lllll' | perl 5re.pl