in reply to Variable in pattern matching line

Be careful, you are not doing what you think you are doing. The backslash in your string is being interpreted as an escape char.
You want $second = 'matching\\.com'. Otherwise you are generating a match on "matching.com" which will match "matchingfcom", etc.

UPDATE: Disregard my inane comments. See below. I'm a moron. The big yellow one's the sun.

-pete
"Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."

Replies are listed 'Best First'.
Re: Re: Variable in pattern matching line
by hardburn (Abbot) on Jul 01, 2003 at 14:00 UTC

    No, the '\' isn't interpreted in single quotes.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

      duh, my mistake. I wrote a little test to verify that and accidently typed double quotes then didn't notice it. That's what I get for trying to answer questions while in the middle of something at work.

      -pete
      "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."