Yitzchak Scott-Thoennes wrote:
To set it, you need to just do the same thing except that at each step
instead of keeping the hash element, you keep a reference to it:

$entryref = \$hash;
$entryref = \$$entryref->{$_} for @a;
$$entryref = 1;

Note that this will create hashrefs at any undefined levels, even the
top one.

I'm sorry but that doesn't work as is on my system: "Not a HASH reference at x.pl line 9.".
--
\^/
-/ O \----------------------------------------
| |/ \| Alexandre (Midnite) Jousset |
-|___|----------------------------------------
  • ... Uri Guttman
    • ... Aaron Sherman
      • ... Uri Guttman
  • ... Vladi Belperchinov-Shabanski
    • ... Alexandre Jousset
      • ... Суханов Вадим
        • ... Alexandre Jousset
  • ... Ton Hospel
    • ... Yitzchak Scott-Thoennes
  • ... Yitzchak Scott-Thoennes
    • ... Alexandre Jousset
      • ... Yitzchak Scott-Thoennes
        • ... Alexandre Jousset
  • ... Andrew Pimlott
    • ... Alexandre Jousset
      • ... Andrew Pimlott
        • ... Alexandre Jousset
          • ... Alexandre Jousset
            • ... Andrew Pimlott
  • ... Zhuang Li
    • ... Jeff Yoak

Reply via email to