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
In reply to Re^2: Dynamic addressing in a hash
by rpaskudniak
in thread Dynamic addressing in a hash
by rpaskudniak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |