On Saturday 30 October 2010 01:42 PM, Uri Guttman wrote:

no. /g just makes the match START at the end of the last match. this
forces it to scan the string to the end so the LOOP will end. /g has
nothing to do with stopping anything itself. it just sets the starting
point of the match. you can do a single match in scalar context without
/g but it will not scan forward for the next time. this is what caused
your infinite loop. /g is very useful in scalar context when used in a
loop.

uri

Got it , Thanks.

Thanks
Jatin

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to