use strict; use warnings; my @matches; while (<DATA>) { push @matches, $1 if m/The dir is '(.*?)'/; } print join "\n", @matches; __DATA__ sdfdfsddf The dir is '/usr' and there are 23 files sdfsdfdsdds The dir is '/bingo' and there are 16 files
In reply to Re: look for a word
by TedPride
in thread look for a word
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |