# test1.pl (uses no user-defined functions): for($i = 0; $i < 100000; $i++) { print $i; } # test2.pl (uses a simple function): for($i = 0; $i < 100000; $i++) { print func($i); } sub func { return $_[0]; } # OUTPUT [falkkin@shadow ~/perl] time perl test1.pl > /dev/null real 0m4.826s user 0m4.240s sys 0m0.010s [falkkin@shadow ~/perl] time perl test2.pl > /dev/null real 0m14.227s user 0m14.100s sys 0m0.050s