http://qs321.pair.com?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