in reply to Is it possible to assign an array reference to a value in hash

my @array = qw(a b c); my %hash; $hash{ key } = \@array;
  • Comment on Re: Is it possible to assign an array reference to a value in hash
  • Download Code

Replies are listed 'Best First'.
Re^2: Is it possible to assign an array reference to a value in hash
by thomas895 (Deacon) on May 15, 2012 at 04:33 UTC

    Or alternatively:

    my %hash = ( foo => [ 'bar', 'baz', 'qux' ], anything => [ 'else', 'you', 'want', 'to', 'include' ] );
    Either way works, your choice.

    ~Thomas~ I believe that the source code to life is written in Perl :-)