My code isI am 60 years old I am 60 years old My code prints only 1 occurence not the successive ones. How to do tha +t ?
#!/usr/bin/perl -w $fn=<>; open(FH, "$fn") || die("Can't open:$!"); while(<FH>) { if($_ =~ /\w\s+\w+\s+\w+\s+\w+\s+\w+/) { print "$_"; } } close FH;
In reply to Howto print multiple matches in a line by ashnator
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |