in reply to Regular expression double grouping negation headache

I'm probably way off here but are you certain that the command line processing isn't interferring here?

Using your exact script on my win32 system, typing:

C:\test>178232.pl "QUICK=BROWN FOX" "JUMPED=OVER THE LAZY" DOG QUICK,JUMPED

Of course, the brain-dead CMD required me to quote the parameters with spaces, but the fact that it then works could mean that its your CLP that is interfering here.

Try inserting:

local($,=",",$\="\n"); # << Corrected typo/brain fade print @ARGV;

at the top of your prog and see what your getting in?

BTW. Is there any specific reason you are escaping the "=" with backslashes? Your regex seems to work fine without them.

update: correct minor typo. (And again!) Ditto!.

Replies are listed 'Best First'.
Re: Re: Regular expression double grouping negation headache
by meonkeys (Chaplain) on Jun 29, 2002 at 21:03 UTC
    local(",=",","$\"="\n");
    Would you please break this down for me? I don't understand it is supposed to do.

    ---
    "A Jedi uses the Force for knowledge and defense, never for attack."

      It should (of course) have been (and now is:)

      local ($,=",", $\="\n");

      Thanks for drawing it to my attention.

        Okay, so it looks like you're trying to print out @ARGV more cleanly by defining the output field separator as a comma and the output record separator as a newline. Cool.

        Just for TMTOWTDI, here's what I usually do:
        use Data::Dumper; print Dumper(\@ARGV);

        ---
        "A Jedi uses the Force for knowledge and defense, never for attack."