Re: More idiomatic

Discussion in 'Perl Misc' started by Rainer Weikusat, Apr 18, 2013.

  1. David Harmon <> writes:
    > On Wed, 17 Apr 2013 07:37:29 +0100 in comp.lang.perl.misc, Ben
    > Morrow <> wrote,
    >>I think the strategy I might go for here would be to concatenate the
    >>pieces to get a unique key, but not try to pull them out again
    >>afterwards. Instead put the individual pieces in a structure,

    >
    > Yes, I think that is a good answer.


    Perl also supports 'multidimensional hash keys'. An expression of the
    form

    $h{a,c,b}

    is equivalent to using a hash key which is created automtically by
    joining the components with the current value of $; as separator
    (default is \034), => perlvar(1)
    Rainer Weikusat, Apr 18, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zed A. Shaw
    Replies:
    2
    Views:
    103
    Zed A. Shaw
    Apr 23, 2005
  2. Charles Calvert
    Replies:
    33
    Views:
    324
    w_a_x_man
    Oct 22, 2010
  3. Alan Mead
    Replies:
    4
    Views:
    135
    Alan Mead
    Feb 12, 2005
  4. J. Gleixner

    Re: More idiomatic

    J. Gleixner, Apr 15, 2013, in forum: Perl Misc
    Replies:
    11
    Views:
    255
    Rainer Weikusat
    Apr 16, 2013
  5. Rainer Weikusat

    Re: More idiomatic

    Rainer Weikusat, Apr 15, 2013, in forum: Perl Misc
    Replies:
    1
    Views:
    148
    Rainer Weikusat
    Apr 15, 2013
Loading...

Share This Page