I must have missed the first posting/response, but it
looks like you are using "use strict;" but not declaring
your $key variable in the right scope.

If you want to use $key as a global you need to declare
it outside of a subroutine using "my $key;"

If you are trying to pass arguments to your subroutine
you need to declare and pop your stack.

see below ---
----- Original Message ----- 
> Still having harassments...
> 
> I now invoke the sub thusly...
> 
> update_value("ftp", $ftp{$key}{value}, $key);
> 
> The sub is like this...
> 
> sub update_value {
> $entry{$_[0]}{$key} -> delete (0, "end");
> $entry{$_[0]}{$key} -> insert ("end", $_[1]);
> }

*** I think you want the following:
sub update_value {
     my $first_arg = shift;
     my $value = shift;
     my $key = shift;

     $entry{$first_arg}{$key} -> delete (0, "end");
     $entry{$first_arg}{$key} -> insert("end", $value);
}

> 
> I get:
> 
> Global symbol "$key" requires explicit package name at v06b.pl line 1561.
> Global symbol "$key" requires explicit package name at v06b.pl line 1562.
> Execution of v06b.pl aborted due to compilation errors.
> 
> If I use $_[2] instead of $key, then it works. Is there a way of passing
> $key as $key to the sub?
> 
> Thanks.
> 

HTH - 

Kevin
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to