in reply to Passing a value from a module

If I understand you correctly, you want to access a variable in a module from somewhere else? If it's a global variable declared like
package Validate; our $msg;
in the module, you can access it from the main program by fully qualifying the name like in $Validate::msg.

If you don't like globals, try a OO-aproach: an object of type Validate offers the numbers() method and carries a $self->{msg} instance variable, which you can offer via the msg() method by the Validate class.