in reply to Re: setting hash keys by array
in thread setting hash keys by array

Here's how I usually do it:

Is this something that you usually need to do? :P

-Lee

"To be civilized is to deny one's nature."

Replies are listed 'Best First'.
Re: Re: Re: setting hash keys by array
by japhy (Canon) on Sep 09, 2002 at 17:23 UTC
    Har har. First, you misunderstand my sentence. Second, it's done more often than you might think. I have a friend at RiskGrades who asked for some help setting up a hash in this way. She gets a list of keys, and needs to build up a hash (of hashes)+ based on those keys.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      I use nested structures all the time. I just can't see too many applications of taking a random list and creating a HoHoH..etc out of it.

      ++ for the best solution.

      I still wonder if this is the question the poster was asking or didn't know how to write a hash slice. :)

      -Lee

      "To be civilized is to deny one's nature."