in reply to Using a subroutine as a module

Whenever you include a module, that module must return true. The most common method for ensuring this is putting an always true value as the last line of code in the module. Ex/
# My module ...code... 42;
Just to point out, if you don't export subroutines on use in your module, than you have to use fully qualified variable names. For this, you need a package declaration in your module. At the top of validate.pm, put package MyModule; (or something similar) and then after use-ing the module from your script, call the sub like MyModule::val_time() and access the variable like $MyModule::val.