What I'm looking for is a single test to use if I don't know ahead of time if the string will refer to a single file or a shell pattern.You can't know. A file named abc[d]e is perfectly legal, and yet using that string as a glob won't match that filename!
You have to change your spec so that it is clear whether the string is a literal or a pattern. Anything else is going to get you into trouble.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Test for file(s): glob or -e?
by merlyn
in thread Test for file(s): glob or -e?
by delirium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |