in reply to look for a word
Do I understand correctly that '/usr' may vary?
If the match is successful, the bit captured by parentheses between quotes is pushed onto @dirs. I've left out file opening and such by using the default diamond op. Read from an open handle for better control.my @dirs; while (<>) { m/^The dir is '([^']*)' and there are \d* files/ and push @dirs, $1; }
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: look for a word
by Anonymous Monk on Jun 09, 2005 at 05:32 UTC | |
by Anonymous Monk on Jun 09, 2005 at 06:15 UTC | |
by reneeb (Chaplain) on Jun 09, 2005 at 10:50 UTC | |
by tchatzi (Acolyte) on Jun 09, 2005 at 11:10 UTC |