#for every module (using Foo::Bar as an example): BEGIN { printf "use Foo::Bar at line %d \n", __LINE__; } use Foo::Bar; # replace with actual module name BEGIN { printf "Foo::Bar loaded OK\n"; } # once for the whole script: CHECK { use Data::Dumper; print Dumper \%INC; }