One, square brackets are significant to glob just as they are to most UNIX shells (e.g. foo[abc] meaning match any of the files fooa, foob, or fooc), so you'll need to escape them with backslashes. Two, see File::Find or File::Find::Rule rather than reinventing the wheel.
Addendum: And you should test if something's a directory (see -d in perldoc -f -X) before trying to recurse down into it anyway.
In reply to Re: perl filenames and square brackets
by Fletch
in thread perl filenames and square brackets
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |