in reply to V basic question about eq

I'd use a regular expression and escape the apostrophies with \Q, such as

if ($short1 =~ /\Q$short2\E/)

Replies are listed 'Best First'.
Re: Re: V basic question about eq
by sauoq (Abbot) on Nov 21, 2003 at 17:22 UTC
    and escape the apostrophies with \Q

    Using \Q is a good idea in any case, but apostrophes aren't regular expression metacharacters.

    -sauoq
    "My two cents aren't worth a dime.";