our @Address=qw(type firstname lastname streetaddress city zip); our @Phone=qw(type name phonenumber); our %Types = ( "addr" => \@Address, "phone" => \@Phone ); our %Stuff; sub ReadStuff{ @Stuff{@{$Types{$_[0]}}} = @_; #...do something useful... }
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: Re: Re: Link a hash and an array
by QM
in thread Link a hash and an array
by SkipHuffman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |