I think I figured it out. I added 3 percent symbols as noted in "RED" below.
This allows 3 or 4 place values to the left of the decimal point.
Let me know if this is incorrect, but it seems to be working now.
my ($val1,$val2) = @_;
my $value = $val1 - $val2;
my $dol_str = reverse sprintf( "%%%%.2f", $value );
$dol_str =~ s/(\d\d\d)/$1./g;
$dol_str =~ s/.$//;
$dol_str = $dol_str;
return scalar reverse $dol_str;
}
Thanks,
Rick
http://www.proline2000.com
Pro-Line Direct Electronics Superstore
This allows 3 or 4 place values to the left of the decimal point.
Let me know if this is incorrect, but it seems to be working now.
Code:
sub { my ($val1,$val2) = @_;
my $value = $val1 - $val2;
my $dol_str = reverse sprintf( "%%%%.2f", $value );
$dol_str =~ s/(\d\d\d)/$1./g;
$dol_str =~ s/.$//;
$dol_str = $dol_str;
return scalar reverse $dol_str;
}
Thanks,
Rick
http://www.proline2000.com
Pro-Line Direct Electronics Superstore