Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: contextual substitution with s///?

by BrowserUk (Pope)
on Feb 01, 2013 at 16:27 UTC ( #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
Node Status?
node history
Node Type: note [id://1016578]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (15)
As of 2016-12-06 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (114 votes). Check out past polls.