in reply to Re: grep items not matching an RE
in thread grep items not matching an RE

doh :-*

Sorry I tried:

my @goodList = grep not /$bad/, @list;
I assumed that ! and NOT were the same. Does this work because ! has a different opperator precedence?

Replies are listed 'Best First'.
Re: Re: Re: grep items not matching an RE
by dave_the_m (Monsignor) on May 14, 2004 at 12:03 UTC
    Does this work because ! has a different opperator precedence?
    Yes,
    grep not /$bad/, @list;
    is parsed as
    grep not(/$bad/, @list);
    since not has lower precedence than ,