in reply to Re: Regex Question
in thread Regex Question

Your index won't work in case there is an a before the third position, e.g. in the string aba. If you (really) want to use index, use the 3-argument-form instead:
$x = "aba"; print "$x\n" if index($x, "a", 2) == 2;
HTH, Rata

Replies are listed 'Best First'.
Re^3: Regex Question
by kcott (Archbishop) on Nov 26, 2012 at 08:43 UTC

    ++ Thanks Ratazong. You're absolutely correct. I've updated my node.

    -- Ken