in reply to Re: Reading specific files
in thread Reading specific files

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 $_.