in reply to Passing a value from a module
in the module, you can access it from the main program by fully qualifying the name like in $Validate::msg.package Validate; our $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.
|
|---|