Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: contextual substitution with s///?

by BrowserUk (Patriarch)
on Feb 01, 2013 at 16:27 UTC ( [id://1016578]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $s = 'The_quick__brown____fox';;
    
    ...
    
    
    fox
    
  2. or download this
    print for split /_+/, $s;;
    The
    quick
    brown
    fox
    
  3. or download this
    print for split / /, '    the quick  brown   fox     ';;
    
    ...
    quick
    brown
    fox
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-18 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found