in reply to Re: open won't die
in thread open won't die

Thanks graff,

With some thought I realized it doesn't matter what the sh or bash consider metacharacters, its what Perl considers metacharacters that counts.

From perldoc -f quotemeta, its: "all char­acters not matching '/A-Za-z_0-9/' "

YuckFoo

Replies are listed 'Best First'.
Re: open won't die
by Abigail-II (Bishop) on Oct 29, 2003 at 00:46 UTC
    What's considered a character special to the shell is *not* the same as all characters not matching /[A-Za-z_0-9]/. This is immediately obvious from the example of the OP. Both examples contain a space, a space is not matched by /[A-Za-z_0-9]/, yet in one case the shell is called, in another it isn't.

    Here's another example:

    $ perl -wle 'exec ", foo" or die' Can't exec ",": No such file or directory at -e line 1. Died at -e line 1.
    No shell called, even with a comma present.

    Abigail