#TestBegin.pm use strict; use warnings; BEGIN{print "inside BEGIN in the module ",__FILE__,"\n"} print "in the module ",__FILE__,"\n"; 1; perl -e "print qq(in the program $0\n);BEGIN{print qq(BEGIN in the program $0\n)}" -MTestBegin inside BEGIN in the module TestBegin.pm in the module TestBegin.pm BEGIN in the program -e in the program -e #### perl -e "print qq(in the program $0\n);BEGIN{print qq(BEGIN in the program\n)}use TestBegin;" BEGIN in the program inside BEGIN in the module TestBegin.pm in the module TestBegin.pm in the program -e