in reply to Including and Excluding with Impunity

alakaboo is right. In your code,
$temp =~ eval $out
is just checking to see if $_ matches the "regex" in $out, which yields a null string if it doesn't, to which you then apply the binding operator with $temp, which simply succeeds -- dunno why, but it does. Thus your test is true every time or false every time depending on how $_ matches up with the $out regex. If it matches, it is false (binding to an integer 1 fails); if it doesn't match, it is true (binding to a null string succeeds).

Replies are listed 'Best First'.
RE: Re: Including and Excluding with Impunity
by jynx (Priest) on Nov 13, 2000 at 23:14 UTC

    That makes sense i suppose. The problem i have is that the
    $temp =~ eval $in
    does work. i ran through with perl debugger and the includes matched when they should and didn't when they shouldn't. This was what had me baffled most...

    i'll retry it using grep, thanx all for your help.

    jynx