It looks to me like you need your FatalsToEmail module to take a reference to a scalar and you need to pass it a reference to $fte_username.
Your package might look something like this...
And you'd use that something like this...package FatalsToClient; use vars qw($client); sub import { my $pkg = shift; my %args = @_; $client = $args{Client}; } 1;
Please recognize that this code is just for illustration. You'll want yours to be somewhat cleaner I expect.my $fte_username = ""; use FatalsToClient (Client => \$fte_username); $fte_username = "client"; print $$FatalsToClient::client, $/; $fte_username = "something else"; print $$FatalsToClient::client, $/;
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Defining variable for module, but IŽll only have it later
by sauoq
in thread Defining variable for module, but IŽll only have it later
by Andre_br
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |