Thanx, Jenda and Japhy.
Damn... I put it as @{ $FUNC{$pkg_func} } but strict complained about it not
being declared.
I see now that I need the -> arrow.
So when is it safe to say stuff like
$$ref
@$ref
??
I have used it with
$$onediminsional_hash_ref{$key}
@$onediminsional_array_ref[$index]
I guess it doens't work with multidimensional data structures?
> -----Original Message-----
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 11:42 AM
> To: Beginners (E-mail)
> Subject: Re: references and dereferencing
>
>
> From: Nikola Janceski <[EMAIL PROTECTED]>
> > Okay.. I am stumped. I must be doing something wrong. I am going to
> > post only the relevant code, let me know if you need more.
> >
> > # $FUNC is a ref to a hash
> >
> > ## in a subroutine
> > foreach my $function (keys %{$FUNC}){
> > my @called_funcs;
> > # populate @called_funcs;
> > push @{$FUNC->{$function}}, @called_funcs;
> > }
> >
> > ## later in code in another subroutine
> > foreach my $pkg_func (keys %{$FUNC}){
> > print join "\n", @$FUNC{ $pkg_func };
>
> This should have been
>
> print join "\n", @{$FUNC->{ $pkg_func }};
>
> I believe. I am actualy a bit surprised you did get anything at all.
>
> Jenda
>
>
> =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
> There is a reason for living. There must be. I've seen it somewhere.
> It's just that in the mess on my table ... and in my brain
> I can't find it.
> --- me
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]