Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Besides doing some other sanitization to make sure it is a dollar amount and no code...my $grossAmt = param("amt"); if($grossAmt =~ /\,/) { $grossAmt =~ s/\,//g; $grossAmt = sprintf('%.2f', $grossAmt); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Removing comma's from int (numbers)
by choroba (Cardinal) on Jun 12, 2013 at 22:16 UTC | |
|
Re: Removing comma's from int (numbers)
by farang (Chaplain) on Jun 13, 2013 at 07:30 UTC | |
|
Re: Removing comma's from int (numbers)
by LanX (Saint) on Jun 12, 2013 at 22:24 UTC |