I have learned how to pass a sub as a parameter into another subroutine, then execute it.
My problem is, how do execute the referenced sub, and inheret the variables of the calling sub?
Thanks in advance for any help.
Regards,
Jeremy A.
------Code-----------
sub writeline { my ($action) = @_; my $test = "hi"; <---variable private too sub.
&$action; <-- want too inherit "$test" into sub without passing it in as a parameter.
}
sub hello { print $test." hello\r\n"; }
writeline(\&hello);
_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs