It probably depends on what you're trying to do, and how important speed is to you. I just checked (using Inline), and calculating integer factorials is anywhere from 7x to 15x faster in C than in Perl.
If most of what my program did was compute factorials, I'd code them in C. If it were 1% of execution time, I'd code it in Perl, optimizing for maintainability. If most of what your program does is compute dates, optimize by using the fastest available module (or just "a faster" module). If most of what your program does is other stuff, optimize for readability by picking the module with the most elegant interface, and possibly the most maintainable code.
That said, it's certainly a big difference; it pays to know that.
#!/usr/local/bin/perl -w
use strict;
use Benchmark;
use Inline C => <<'END_OF_C';
int factorial_c(int n) {
int i, result;
for(result=1, i=2; i<=n; i++)
result *= i;
return result;
}
END_OF_C
sub factorial_perl {
my $n = shift;
my $res=1;
my $i;
for($i=2; $i<=$n; $i++) {
$res *= $i
}
$res;
}
factorial_perl(10) == factorial_c(10)
or die "differing values, stopped";
my $res;
timethese(4_000_000,
{
C => '$res = factorial_c(10)',
Perl => '$res = factorial_perl(10)',
}
);