apackage.pm: use strict; sub process1 { print "abcd\n"; } 1; test1.pl: my $a = \&process1;#process1 does not exist at this moment print $a, "\n"; require apackage;#process1 is realized. If you comment out this, there would be an error when you call process1 later. print $a, "\n"; &$a;