pc88mxer has asked for the wisdom of the Perl Monks concerning the following question:
Code that computes what I'm trying to describe:
If not for a general list @b, how about if @b contains just a single element:my @list; for my $a (@a) { for my $b (@b) { push(@list, $h{$a}{$b}); } } # return @list;
@h{@a}{$x} ≡ map { $_->{$x} } @h{@a}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: chained hash slices?
by ikegami (Patriarch) on Jun 03, 2008 at 05:06 UTC | |
|
Re: chained hash slices?
by ysth (Canon) on Jun 03, 2008 at 07:15 UTC | |
|
Re: chained hash slices?
by moritz (Cardinal) on Jun 03, 2008 at 06:11 UTC | |
by ikegami (Patriarch) on Jun 03, 2008 at 06:40 UTC | |
by moritz (Cardinal) on Jun 03, 2008 at 06:52 UTC |