- or download this
BEGIN { require Module; Module->import( LIST ); }
- or download this
use Module ();
- or download this
BEGIN { require Module }
- or download this
#!/usr/bin/perl
...
}
print "***** See? No code in LoadMe is executed! *****\n";
- or download this
package LoadMe;
...
print "LoadMe: Module initialisation\n";
system "echo Perl is fully working and can run arbitary code, includin
+g external programs";
1; # or any other non-false value
- or download this
/tmp/use-demo>perl demo.pl
>>> About to execute 'use LoadMe;' <<<
...
Good bye cruel world
/tmp/use-demo>
- or download this
/tmp/use-demo>perl -cw demo.pl
>>> About to execute 'use LoadMe;' <<<
...
LoadMe.pm syntax OK
/tmp/use-demo>