Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I assume that is supposed to be $name in both places? The period in the file name is a regular expression meta-character which will match any character so you have to escape it to match a literal period character. This is usually done by using the quotemeta operator. The regular expression, as it is, will match any file name of any length that contains the string 'aramis.DAT' so you should anchor the pattern so it just matches a file name of the same length as the pattern. In other words:
Should be:
Or you could compare file names without using regular expressions:
In reply to Re: Legacy Data Files on a Case-sensitive File-system
by jwkrahn
|
|