in reply to setting and retrieving sub-hash elements in an object
Also, to add new items to a hash but otherwise key the has intact (assuming the array is even-sized) you can do:sub option { my ( $self, $key, $value ) = @_; if ( defined( $value ) ) { $self->{ options }->{ $key } = $value; } $self->{ options }->{ $key }; }
%hash = ( %hash, @array );
-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important
|
---|