I think there's something going on besides just loading modules that you aren't seeing with your homemade profiling. I'd say it's time to get out the big guns and run Devel::DProf, or maybe Devel::SmallProf in this case since you don't really have any subs at all in your script. Alternatively, you could run the script in the debugger, and maybe you'll discover that it's doing some things you didn't realize.