Use range operator with for statement
$factorial = 1; for (1 .. 6) { $factorial *= $_; } print "6! = $factorial\n";