http://www.perlmonks.org?node_id=838205

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.in > data.out

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