Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Perl doesn't see commas as being part of a number?#!/usr/bin/perl use warnings; use strict; my $num = "1,002,345"; my $total = $num + 1000;
perl test.pl Argument "1,002,345" isn't numeric in addition (+) at test.pl line 8.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Numbers with commas
by tachyon (Chancellor) on May 13, 2004 at 01:25 UTC | |
by TilRMan (Friar) on May 13, 2004 at 01:48 UTC | |
by tachyon (Chancellor) on May 13, 2004 at 02:10 UTC | |
by TilRMan (Friar) on May 13, 2004 at 06:12 UTC | |
|
Re: Numbers with commas
by TilRMan (Friar) on May 13, 2004 at 01:42 UTC | |
|
Re: Numbers with commas
by Gunth (Scribe) on May 13, 2004 at 01:47 UTC | |
|
Re: Numbers with commas
by l3nz (Friar) on May 13, 2004 at 07:32 UTC | |
|
Re: Numbers with commas
by sulfericacid (Deacon) on May 13, 2004 at 01:15 UTC | |
by muntfish (Chaplain) on May 13, 2004 at 07:51 UTC | |
|
Re: Numbers with commas
by benrwebb (Scribe) on May 13, 2004 at 04:31 UTC |