deadpainter
Programmer
Honestly, it's been a few years since I've used Perl, and it was never something I used on a regular basis. This is probably a simple question, although I am having issues finding an answer. I have the following calculation:
$temp = $myNum / 10;
$newNum = sprintf("%.0f\n",$temp);
The issue is that I need to format the number so that it does not round $newNum up, and I do not want a decimal number.
ie: if $temp = 26, I want $newNum = 2, not 3.
Any thoughts?
$temp = $myNum / 10;
$newNum = sprintf("%.0f\n",$temp);
The issue is that I need to format the number so that it does not round $newNum up, and I do not want a decimal number.
ie: if $temp = 26, I want $newNum = 2, not 3.
Any thoughts?