As you have stated, you created these subs in the package 'testpm'. When you run your program you're in the 'main' package (hence the error message Undefined subroutine &main::getList).
What you need do is either access your subs using a fully qualified name (eg. testpm::getList), export your subroutines to the main namespace using Exporter, or create your module as an object and turn your subs into methods (explained in perlboot, perltoot, perltooc, and perlbot).
If you choose the object method then I would also recommend TheDamian's book Object Oriented Perl
grep
|
Mynd you, mønk bites Kan be pretti nasti... |
| [reply] |
Thanks grep !! It was helpful..
Anandatirtha
| [reply] |