PERL-Accessing Variables from the Caller's Package
Posted by:
adcertpoint
(Moderator)
Date: April 29, 2020 04:37PM
Sometimes you want to access variables from the caller's package. One way is to do something like this:
{
no strict 'vars' ;
my $caller = caller;
print qq[$caller --- ${"${caller}::var"}];
}