#!/usr/bin/perl use Time::HiRes qw(time); my $start; BEGIN { $start = time() }; # rest of module loading here # then initialization (open database connections etc.) warn "Startup time: ", time() - $start; # rest of script goes here