HOWTO Make a Perl Module


Revision History
Revision 1.02004-04-19OC
first official release


This sets out the elementary steps in making a Perl module with two subroutines. Best practice suggests that common subroutines should be placed in a module rather than a library.

The creation of a simple module is easy, all that needs to be done is to follow the instruction below and you will have made your first module. The example here will use two subroutines, one called 'trim' from the Perl Cookbook that trims leading and trailing spaces, the other a formatted time routine called 'yyyymm' that could come from one of the regular Date or Time modules.