in reply to Hash Push

Why does it have to be "recursive"? That doesn't make sense. This smells like homework. {grin} In any event, something this simple would do it:
my $hash_ref = {map { $_ => [1..$_] } 10..20 };
There. A hash ref of arrayrefs.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: RE: Hash Push
by Adam (Vicar) on Aug 16, 2000 at 02:43 UTC
    Yes, well, er, um... ok... point taken.

    But it isn't homework, its recursive because the routine reads a file, and that file might include a pointer to another file, which I would then need to go read. That reeks of recursion. And uh, merlyn, your answer doesn't even come close.

      You're right. I didn't generate the result you wanted because I couldn't quite fathom your routine, so I fell back to trying to read your specification, and came up with what I did.

      Honest mistake. Better specification always helps.

      -- Randal L. Schwartz, Perl hacker