Help for this page
use strict; use warnings; ... print "N=$num, R=$root\n"; #the rest is the same as you had it
use strict; use warnings; ... ? $num/$near : $near ;