in reply to Re: Dynamic addressing in a hash
in thread Dynamic addressing in a hash
I tried something similar but it ended up not referencing the actual element within the original hash. I see you have added an extra "next" operation to walk down the structure. Other responses have had a similar idea.
One question, hv: The // operator you use here:
The usual cheat-sheets list this only as similar to the bitwise || "or" operator. Please explain how you are using this here. The Camel book (4th Ed, p. 27) gives this example, though I've never seen this used:$config->{$field} //= {};
which makes as much sense to me as *your* use of the // operator.$val ||= "2"; # Set $val to 2 if it isn't already "true".
Please enlighten..
Thanks. (I waive consecutive translation. :-)
-- RP
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Dynamic addressing in a hash
by hv (Prior) on Sep 01, 2022 at 10:11 UTC | |
by rpaskudniak (Novice) on Sep 01, 2022 at 13:19 UTC | |
Re^3: Dynamic addressing in a hash
by AnomalousMonk (Archbishop) on Sep 01, 2022 at 04:00 UTC |