How do you write a module for Perl? In Python you can use:
# module.py
def helloworld(name):
print \"Hello, %s\" % name
# main.py
import module
module.
The last third of Intermediate Perl is devoted to module creation.
Whenever you want to know how to do something in Perl, check perltoc, the table of contents for the Perl documentation:
% perldoc perltoc
Several parts of the core Perl documentation can help you:
perlnewmod
perltoot: Tom's Object-Oriented Tutorial
Good luck,