Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Look Ahead:

by nvivek (Vicar)
on Apr 02, 2010 at 09:14 UTC ( [id://832455]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://832455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found