Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

m//g behaves strange...

by Anonymous Monk
on Nov 09, 2003 at 21:15 UTC ( #305715=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -l
    
    ...
    $_="123";    /./g; undef pos; print "#6: ", /\G./g;
    $_="123";    /./g; pos = 2;   print "#7: ",   /./g;
    $_="123";    /./g; pos = 2;   print "#8: ", /\G./g;
    
  2. or download this
    #1: 123
    #2: 23
    ...
    #6: 123
    #7: 3
    #8: 3
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://305715]
Approved by ybiC
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2021-08-04 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (41 votes). Check out past polls.

    Notices?