Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: How to Remove Commas ?

by tobyink (Canon)
on Mar 27, 2012 at 14:06 UTC ( #961936=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $var = "foobarfoobaz";
    $var =~ s/foo//;
    say $var;   # says "barfoobaz"
    
  2. or download this
    my $var = "foobarfoobaz";
    $var =~ s/foo//g;
    say $var;   # says "barbaz"
    
  3. or download this
    my $var = "foobarfoobaz";
    $var =~ s@foo@@g;
    say $var;   # says "barbaz"
    
  4. or download this
    my $var = "foobarfoobaz";
    $var =~ s{foo}{}g;
    say $var;   # says "barbaz"
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://961936]
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: (2)
As of 2022-10-01 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (126 votes). Check out past polls.

    Notices?