[mylibrary1.pm] package mylibrary1; use base 'Exporter'; use vars qw( @EXPORT @EXPORT_OK ); @EXPORT = qw( half ); # These are the ones that are imported if nothing is specified. @EXPORT_OK = qw( half ); # These are the ones you may specify, if you want. sub half { my $number = shift; return $number / 2; } 1; # All .pm files must end with a true value __END__