in reply to Re^2: Sum fields in Array
in thread Sum fields in Array

Here's another question for you. How can I take out a comma in a money field? It doesn't like it when it adds them up.

Replies are listed 'Best First'.
Re^4: Sum fields in Array
by jethro (Monsignor) on Feb 04, 2010 at 21:24 UTC

    Yes, that is similar to SQLs group by.

    Do you mean commas that are used as decimal points (done in some parts of the world, for example Germany), or commas as separators for every 10^3 step?

    In the first case you might substitute the comma with a decimal point ( $num=~s/,/./;), in the second case you might remove all the commas before counting ( $num=~s/,//g; the g means global, do it to all commas, not just one)