Never, ever use <> for globbing. Always always use glob instead. Gets rid of all ambiguity.
As jethro said, your variable name implies that it's just a directory you're getting, so you still have to add the "/*.type" inside your code. If the user is passing in the * on the command line, then what you have would work if you switched over to glob. What you have right now looks to me like the perl compiler is treating $path_to_dir as if it were a filehandle and trying to read all lines from that filehandle. Using glob eliminates the confusion.
In reply to Re: Globbing uncertainty
by Tanktalus
in thread Globbing uncertainty
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |