Zielfelder, Robert <[EMAIL PROTECTED]> wrote: : : I am trying to figure out why the following doesn't work the : way I would expect it to: : : $var1 = 1.5; : $var2 = sprintf(".0f", $var1);
I think you meant sprintf("%.0f", $var1). Note the added '%'. printf '%.0f', 1.5; # works as you expect on perl 5.6.1 and up. Perhaps there is something else is affecting the value of $var2. HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>