in reply to Better Style

As someone else mentioned, read perldoc perlmod. After that, read perldoc perlmodlib. You might also want to read Simple Module Tutorial, a tutorial written by our very own tachyon.

Basically though, you'll do something like this:

package LocalUtilities; require Exporter; our @ISA = qw( Exporter ); our @EXPORT_OK = qw( record_visit random_quote ); sub record_visit { # do stuff... } sub random_quote { # do other stuff... } 1; # Always end your modules with a true expression.
And then you'll use it like this:
use LocalUtilities qw( random_quote ); LocalUtilities::record_visit(); print random_quote();
You can do it without the Exporter stuff, but you might as well use it. Read perldoc Exporter for more information. You should probably also learn about h2xs as soon as possible so read perldoc h2xs too.

Since you have some C++ background, you will probably be interested in Perl's OO facilities. (You'll either love 'em or hate 'em.) You can find more information by reading the perlboot, perltoot, perltootc, perlobj, and perlbot perldocs and here in the Tutorials section.

Of course, someone may have already written code that could replace your utility functions; if so, it may even be more complete and better tested than your own. Check CPAN to find out. Finally, after you decide your module fills a niche not already filled by modules available on CPAN (or you think yours does it better), consider contributing your code. Read perlnewmod for some advice on how to do that.

-sauoq
"My two cents aren't worth a dime.";