in reply to limit of for loop!!
And if you just want to display it nice, use printf "%.3f\n", $a;. This is covered in perlfaq4