>>>>> "HP" == Harry Putnam <rea...@newsguy.com> writes:
HP> A third sub function is called in the dispatch table ( N(@_); ) but HP> the variables don't survive to be use there. there are no variables to survive in a sub, just passed arguments in @_ HP> The output from the script below: HP> Shows 6 elements arrive in dispt($g, @ar) as @_. But when sub N(@_) HP> is called, no variables arrive there. @_ is empty. When it seems like HP> 5 elements should have arrived there well, it helps if you actually pass in arguments. @_ is NOT a global. HP> my $code = $dispt{$selection} || $dispt{'error'} ; HP> $code->(); you aren't passing anything in to $code. you need to put something in the () which then is set in the @_ of the called sub. uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/