in reply to #include equivalent in Perl.

A module should end in a statement that evaluates to true. It is common to simply end your module with this:

1;

You'll have another challenge. Require doesn't import tpack(). Have a look at perlmod. That is the POD where you can read up on properly implementing a module. In specific, you're probably wanting for the module to export tpack(), and then for your main script to use instead of require(ing) the module.


Dave