in reply to Test for file(s): glob or -e?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Test for file(s): glob or -e?
by delirium (Chaplain) on Feb 18, 2004 at 18:37 UTC |