in reply to Re: Look Ahead:
in thread Look Ahead:

I knew how to match the string but I want to know why it is working like that?Explain me?

Replies are listed 'Best First'.
Re^3: Look Ahead:
by rmflow (Beadle) on Apr 02, 2010 at 12:42 UTC
    Because sometimes you need to look ahead without actual matching.

    For example:
    $num = scalar reverse "1000000000000"; $num =~ s/(\d\d\d(?=\d))/\1,/g; print scalar reverse $num;
    will print 1,000,000,000,000