in reply to Bug in perl command line processing?

See also How Command Line Parameters Are Parsed and Behind the GUI lives the Shell

  • Comment on Re: Bug in perl command line processing?

Replies are listed 'Best First'.
Re^2: Bug in perl command line processing?
by sauoq (Abbot) on May 22, 2012 at 20:44 UTC

    This completely misses the point.

    -sauoq
    "My two cents aren't worth a dime.";

      This completely misses the point.

      Not it doesn't , the point of a "SEE ALSO" section is to "SEE ALSO"

      The OP doesn't even specify what shell he is dealing with, and this is shell quoting territory

        I'd have thought the same thing if it weren't that it works even tho there is no '-' on the 'e', which says to me its not purely the shell playing tricks on us. Anyway, I can replicate in bash.

        ---
        $world=~s/war/peace/g

        No, it isn't shell quoting territory, if you'd pay attention you'd see it is all passed as one argument. The problem is /perl/ and not the shell is splitting on whitespace and making assumptions about how many arguments '-i' takes, and what do with the excess arguments. Check the link provided in the question to read the technical details.


        Evan Carroll
        The most respected person in the whole perl community.
        www.evancarroll.com

        Now you've missed the point twice.

        FWIW, it works on Windows as well, with suitable quoting, of course.

        -sauoq
        "My two cents aren't worth a dime.";