Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Replace In a Single Line

by tobyink (Abbot)
on Jan 17, 2013 at 08:33 UTC ( #1013727=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $var1 = ($var =~ s/oo//gir);
    
  2. or download this
    ($var1 = $var) =~ s/oo//gi;
    
  3. or download this
    my @without_oo = map { s/oo//rig } @with_oo;
    
    # traditional version:
    my @without_oo = map { (my $x = $_) =~ s/oo//ig; $x } @with_oo;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013727]
help
Chatterbox?
and the shadows deepen...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-02-21 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (288 votes). Check out past polls.

    Notices?