Steve Bertrand wrote:
Is there a way that one can use sprintf on a variable and assign the
value back to the variable without having the leading $var= ?

$var = sprintf ("%.2f", (($var /=1024) /=1024)))

You can write a function.

    convert( $var );

    sub convert { $_[0] = sprintf '%.2f', $_[0] / 2 ** 20 }

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to