Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: remove a comma

by mr_ron (Chaplain)
on Jun 20, 2018 at 22:30 UTC ( [id://1217080]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $sql = do {local $/; <>};
    $sql =~ s/\( ([^()]+) \) , \n\)/($1)\n)/x;
    print $sql;
    
  2. or download this
    C:\Users\...>perl -i.bak chop-sql-comma.pl CUSTOMER_NEW.txt
    
  3. or download this
    perl -Mv5.14.0 -i.bak -e^
     "local $/;print <> =~ s/\( ([^()]+) \) , \n\)/($1)\n)/xr"^
      CUSTOMER_NEW.txt
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-20 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found