in reply to how to check whether a particular word exists in filename
if ( ( $file =~ m/^CHECK*/ ) && ( $file =~ m/\.txt$/ ) && ( $file !~ m +/A1\.txt$/ ) ) {
Note that I've added a backslash before your .. If you intend to match literal periods, you need to escape them because period is on of the Metacharacters; it matches anything except a new line.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|