in reply to Correct syntax to access an array slice within a hash within a hash
This is because technically, the slice is a list, and in Perl we use @ to indicate a list.
A short example:
This is done without references, so be sure to dereference your hash ref in your code.# array slice @arr = qw(zero one two three); @arr[1,2] = (2,3) # hash slice %hash = ( one => 1, two => 2, three => 3, four => 4, ); @hash{'two','three'} = qw(two three);
Hope that helps.
|
|---|