c:\test>copy con testModule.pm #!/usr/bin/perl package testModule; use strict; use warnings; sub new{ my $class = shift; my $self = {}; bless $self, $class; return $self; } sub printSomething{ return 'Something!'; } 1; ^Z 1 file(s) copied. c:\test>copy con testTestModule.pl #!/usr/bin/perl -w use strict; use testModule; my $ob = new testModule; print $ob->printSomething; ^Z 1 file(s) copied. c:\test>testTestModule.pl Something!