#!/usr/local/bin/perl print "Please enter a number: "; $n = ; chomp $n; $acc = 1; for ($i = 1; $i <= $n; $i++) { $acc *= $i; } print "$n! = $acc\n";