in reply to (tye)Re: "Commifying" a number
in thread "Commifying" a number
my $number = 123; $number =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g; print $number;
I get no output from the print, almost as if $number if undef. If I use 1234 as the input, I get 1,234 out - which is right ..
That's with Perl 5.004.04 on Solaris .. maybe it's a version thing.
-- Foxcub
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "Commifying" a number
by Abigail-II (Bishop) on Dec 13, 2002 at 12:30 UTC |