This assigns a reference to @arr to $val[0], because $mapp{FirstKey} contains a reference to the array @arr. When you stringify the reference, you get something like "ARRAY(0x7ffafc013bf8)". If you wanted to make @val a copy of @arr, then you can:@val = $mapp{"FirstKey"};
@val = @{$mapp{FirstKey}};
In reply to Re: Map a string to an array
by runrig
in thread Map a string to an array
by jess195
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |