|Do you know where your variables are?|
Re: Using a subroutine as a moduleby ysth (Canon)
|on Nov 03, 2003 at 00:29 UTC||Need Help??|
The other answers so far have addressed your actual problem. I'd like to add a comment on your "validate.pm".
You start it with a shebang line, which is an odd thing to do since it is not actually executed (nor will any flags such as -w be parsed from the line by perl).
Usually (but only optionally) a module will declare its own name space and only export to the use'ing code subs that are requested:
and in the calling code:
You might take a look at perlmod.pod for more info on creating modules.
One last comment: one-level all-lowercase names like "validate" are usually for pragmas and are reserved for use by perl5-porters.