in reply to Globbing uncertainty
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Globbing uncertainty
by ikegami (Patriarch) on Nov 11, 2010 at 18:53 UTC |