This is for you script file 'mycode.plx'
# In script file named: mycode.plx
use diagnostics; # This just gives you more info.
use lib '/home/neversaint/MyPerl/src';
# Now the rest of your code.
This is for your package file 'MyPackage.pm'
# In MyPackage.pm
print("My some function");
Now here is the important part. The use statement
, the file name
, and the package declaration MUST
all be in the same case.
- Use statement: use MyPackage;
- File Name: MyPackage.pm
- Package statement: package MyPackage;