in reply to From arrayref to hashref
This works assuming that you'll be giving it a list with key-value pairs like somy %cells = map { ... };
This is because hashes are assigned lists where each value alternates between being a key and a value. So the following are equivalent.my %cells = qw(key1 val1 key2 val2 key3 val3);
my %cells = qw(foo one bar two baz three); my %cells = (foo => "one", bar => "two", baz => "three");
broquaint
|
|---|