- or download this
[mylibrary1.pl]
...
my $number = shift;
return $number / 2;
}
- or download this
[mylibrary1.pm]
...
1; # All .pm files must end with a true value
__END__
- or download this
[myscript.pl]
require 'mylibrary1.pl';
print half( 10 ), "\n";
- or download this
[myscript.pl]
use mylibrary1 qw( half );
print half( 10 ), "\n";
- or download this
use Foo; # Imports everything in @EXPORT, nothing in @EXPORT_OK
use Foo 'bar'; # Imports 'bar' if it's in @EXPORT_OK. Imports nothing
+from @EXPORT
use Foo (); # Imports NOTHING from either.