http://qs321.pair.com?node_id=69551


in reply to Re: Why does this happen?
in thread Why does this happen?

if ($input eq $matching[0||1||2]) {die "bastard\n"};
which means exactly the same as:
if ($input eq $matching[1]) {die "bastard\n"};
Were you expecting it to mean something different, especially since you said it "works"? In what manner did you mean "works"?

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: Re: Re: Why does this happen?
by $code or die (Deacon) on Apr 04, 2001 at 10:17 UTC
    ahh - I only tested it with $matching[1]. Oops. /me goes red!

    The lesson is... test, test, test - especially if you do something like I did that you've never seen anyone else do (usually for good reason!)

    $ perldoc perldoc
A reply falls below the community's threshold of quality. You may see it by logging in.