sprintf("%.1f%", $hoge / $sum * 100);
Invalid conversion in sprintf: end of string...
sprintf("%.1f%%", $hoge / $sum * 100);