If you can save a file on the computer your script runs on, you can save a module. A module is no big deal; it is just a file which name normally ends in .pm and which must return the value of '1'.
It is no different from your .lib file.
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law