You need code tags, but the linking of '\.log' suggests that you have square brackets around that in the regex. Try: next unless ($path =~ /\.log$/); Square brackets will turn that into a character class, testing for any of the individual characters of '.log'.
Have you looked at File::Find or glob for this task?
After Compline,
Zaxo
In reply to Re: next if regex matches
by Zaxo
in thread next if regex matches
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |