Re: dereferencing hash arrays

2010-08-19 Thread Sharan Basappa
wow! My impending question about usage of -> also got answered ... On Thu, Aug 19, 2010 at 5:59 PM, Chas. Owens wrote: > On Thu, Aug 19, 2010 at 07:51, Sharan Basappa > wrote: >> Hello, >> >> Assuming I have reference to an hash array $rHash, what would be the >> way to dereference it. >> Woul

Re: dereferencing hash arrays

2010-08-19 Thread Chas. Owens
On Thu, Aug 19, 2010 at 07:51, Sharan Basappa wrote: > Hello, > > Assuming I have reference to an hash array $rHash, what would be the > way to dereference it. > Would it be: %hashEntry = %{$rHash}; ? snip The ways to dereference a hash are # treat $ref as a hash variable %$ref # treat $ref as

Re: dereferencing hash arrays

2010-08-19 Thread Robert Wohlfarth
On Thu, Aug 19, 2010 at 6:51 AM, Sharan Basappa wrote: > Assuming I have reference to an hash array $rHash, what would be the > way to dereference it. > Would it be: %hashEntry = %{$rHash}; ? > Yes, that dereferences the hash. It's useful notation in loops... foreach (keys %{$rHash}) while (my ($

dereferencing hash arrays

2010-08-19 Thread Sharan Basappa
Hello, Assuming I have reference to an hash array $rHash, what would be the way to dereference it. Would it be: %hashEntry = %{$rHash}; ? Regards, Sharan -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/