http://www.perlmonks.org?node_id=545788


in reply to My first module

Just clear up the potentially obvious stuff. Your module should be:

########## test_module.pm ########## package test_module; use strict; sub testsub { my $in_arg= shift; my $new_arg=$in_arg+10; return($new_arg); } 1;
Also, you can start out with everything in one file first:
#!/usr/bin/perl -w use strict; package test_module; use strict; sub testsub { my $in_arg= shift; my $new_arg=$in_arg+10; return($new_arg); } my $var=10; my $new_var=test_module::testsub($var); print "$new_var\n";

Hazah! I'm Employed!