Chas. Owens wrote:
On Sat, Mar 22, 2008 at 11:53 PM, Richard Lee <[EMAIL PROTECTED]> wrote:
snip
@{ $HoH{$1} }{ @{ $HoA{$1} } } = split;
This is really spinning my heads in all direction trying to see if I can
truly understand them instead of just using it.
snip
Take a look at
http://perldoc.perl.org/perldata.html#Slices
and
http://perldoc.perl.org/perlref.html
Absolutely.
What's happening is that we assign what's returned from split() to a
hash slice.
@hash{ @keys_list } = split;
The hash in this case is one of the anonymous hashes in %HoH. The
reference to it, $HoH{$1}, needs to be dereferenced.
@{ $HoH{$1} }{ @keys_list } = split;
----^^^^^^^^^^^^^
The keys_list is one of the anonymous arrays in %HoA. The reference to
it, $HoA{$1}, needs to be dereferenced as well.
@{ $HoH{$1} }{ @{ $HoA{$1} } } = split;
-------------------^^^^^^^^^^^^^
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/