your grep is matching only files with the extension .txt
molson is using the regular expression /\.txt/ which will match the string '.txt' anywhere in $_ while a file extention implies that the string will only appear at the end of the string in $_.
In reply to Re^2: Reading specific files
by jwkrahn
in thread Reading specific files
by molson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |