in reply to one hash value (array) into another
Really close.
What your hash ends up looking like is:
%hash = ( 'one' => [ 'abc', 'def', 'ghi' ], 'two' => 3 );
This is because $hash{'two'} is being assigned the length of the array held in $hash{'one'}. (in the same way that $array_size = @array would assign $array_size the length of @array)
What I assuming you want is a hash that ends up like:
which can be accomplished by something like so:%hash = ( 'one' => [ 'abc', 'def', 'ghi' ], 'two' => [ 'abc', 'def', 'ghi' ] );
$hash{'two'} = [ @{$hash{'one'}} ];
-enlil
In Section
Seekers of Perl Wisdom