Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

m//g behaves strange...

by Anonymous Monk
on Nov 09, 2003 at 21:15 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-18 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found