Connecting Tech Pros Worldwide Forums | Help | Site Map

Probably a bug with $#

Leszek Rupnicki
Guest
 
Posts: n/a
#1: Jul 23 '06
do {
local $# = '%f';
$x = 0.000001;
$sql = "Something $x something";
print $sql;
};

Result:
Something 1e-06 something

And should be:
Something 0.000001 something

Is this my fault or a bug?
I'm using perl v5.8.7

You may also like to check this:
$x = 0.000001;
print "$x";
do { local $# = "%.10f"; print "$x"; };
print "$x";


Closed Thread