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
In reply to Re: look for a word
by Zaxo
in thread look for a word
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |