in reply to Using subroutine between scripts

This may not be the standard way of doing things but I find that it works well for me. I just create a library file (not a module) and put all my subs in it. I use a .lib extension for these files to reduce confusion. You could use any extension you want though. Any way, create the .lib file and put your subs in there, including any use statements for modules required by the subs. Be sure to put a valid statement outside any of the subs to keep perl from bombing out. I just put 1; as the last line of the library file. To use this library, put a require '/path to file/file.lib'; in the main program. This will allow you to call any of the subs in the library file from the main program. There's my $.02 worth.
Library file example:
#!/usr/bin/perl use Some::Module; sub Sub1 { ... some code return somevalue; } 1;
Example main program:
#!/usr/bin/perl -w use strict; use warnings; require '/path to library/libraryfilename'; my $test = Sub1(1,3,"a"); print $test; exit;
Again, this is probably not the standard way of doing things but it very easy and quick.