in reply to Question: File name pattern match using Grep function

/.txt/ and /\.txt/ are two different patterns, only the first one will match ltxt.
my @files = glob "$folder/*$file_mask";