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

un-format currency

by hossman (Prior)
on May 03, 2010 at 21:44 UTC ( #838205=CUFP: print w/replies, xml ) Need Help??

Note to self: when someone has helpfully mudded up the data by adding commas and dollar signs to currency values, this can be easily undone...

perl -ple '$_ = reverse; s/(\d{3})\,(?=[\d,]+\$)/$1/g; s/\$//g; $_ = r +everse' < > data.out

Replies are listed 'Best First'.
Re: un-format currency
by toolic (Bishop) on May 03, 2010 at 22:47 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: CUFP [id://838205]
Approved by ww
[Tanktalus]: I'm sure it'll make perfect sense once we figure it out :)
[Lady_Aleena]: marioroy, not a quoting error. I can't run it on the command line. It is when I put it in qx() where it falls apart.
Discipulus hired to use Perl in Eataly? haired maybe
[choroba]: We're hiring
[Discipulus]: wow praha!
[Tanktalus]: choroba: do I have to move? :)
Discipulus has too much roots in a 2770 yo town
[marioroy]: I want a job after completing MCE in about a week. But feel that I've moved to the wrong place.
[choroba]: I fear so. We have offices in Prague, Brno, Saigon and San Francisco.
[Discipulus]: choroba if let your company to hire Tanktalus and marioroy ... what a big fishing!

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2017-04-23 20:08 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (432 votes). Check out past polls.