Instead of looking at the cost in low-level ops, try system call tracing or malloc tracing (strace and e.g. valgrind in Linux) and see what kind of a pig "perl -le 'print 42' is". Compare with
#include <stdio.h>
int main() { printf("42\n"); return 0; }
Not to mention comparing with chucking the include and going for write(1, "42\n", 3)...
For a really scary output move up to, say, "perl -MCGI -e 1".
an alternate viewpoint (Score:2)
#include <stdio.h>
Not to mention comparing with chucking the include and going for write(1, "42\n", 3)... For a really scary output move up to, say, "perl -MCGI -e 1".int main() { printf("42\n"); return 0; }