in reply to Re: Common elements of a hash of hashes
in thread Common elements of a hash of hashes
my %HoH = %{+shift};
Did I miss something? I don't see the word "shift" in the entire thread. Anyway, that takes the first parameter, dereferences it as a hashref and assigns the resulting hash to %HoH. The plus sign is needed for preventing Perl to take $shift as a reference and instead use the shift function. shift without arguments operates on @_ (UPDATE: or @ARGV depending on the scope).
lc is "lowercase". I'm not sure about the comma.
grep { $count!=$count{$_} } map { ++$count{$_};$_ } map { keys %{$HoH{$_}} } keys %HoH
the result of this line is stored in which variable?
That returns a list but, since it's surrounded with [ and ], the for loop gets a reference to that list. It's not stored anywhere. It's visible inside the loop as $_.
I see it the other way around, that is, s/obscure/brilliant/.
--
David Serrano
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Common elements of a hash of hashes
by blazar (Canon) on Oct 09, 2005 at 09:14 UTC |