if(eval { require "foo.pm"; 1; } ) { print "loaded module ok\n"; }else{ print "could not load module $@\n"; } #### if(eval " use foo; 1" ) { print "loaded module ok\n"; }else{ print "could not load module $@\n"; } #### print petrol "hello there !"; #### print STDOUT "hello\n"; #### Unquoted string "petrol" may clash with future reserved word at p line 3. Name "main::petrol" used only once: possible typo at p line 3. print() on unopened filehandle petrol at p line 3.