in reply to Re: perl newbie question
in thread perl newbie question

Note that int always rounds towards zero. To get it to round (more) correctly:
$newtemp =100*((($temp-32)*5)/9); if ($newtemp > 0) { $newtemp = int($newtemp + 0.5)/100; } else { $newtemp = int($newtemp - 0.5)/100; }
But (s)printf really is the right solution here...