Hi
I am running the following code and receiving the warning :
Use of uninitialized value in pattern match (m//) at a.pl line 15.
a.pl :
/
**************************************************************************************/
sub CommaFormatted{
my $delimiter = ','; # replace comma if desired
my($n,$d) = split /\./,shift,2;
my @a = ();
while($n =~ /\d\d\d\d/)
{
$n =~ s/(\d\d\d)$//;
unshift @a,$1;
}
unshift @a,$n;
$n = join $delimiter,@a;
$n = "$n\.$d" if $d =~ /\d/;
return $n;
}
print CommaFormatted(10000);
/
**************************************************************************************/
Please help.
Thanks
Ankur Jain
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/