http://qs321.pair.com?node_id=470042


in reply to Improving PERL Performance

Under mod_perl, the perl code gets loaded once, and lives for the lifetime of the Apache handler process. (Apache forks off several children for handling requests). That is, the time it takes to load modules is a one-time hit.

I seriously doubt that you're going to find a measurable difference by splitting common code into a .pl (or .pm) that both scripts load, unless you're doing something that kills the handler process. When the handler dies, Apache/mod_perl has to set up a new one from scratch.

Still, benchmarking is the way to prove this. Even if there's not any difference, it's a good skill to have within reach.