in reply to Duplicating Pascal's with statement in Perl for anonymous data structures
One option is to do this:
Of course, this way you can not read the values from the hash, only write them, and the changes are written to the hash at once, not with each key.%$anonhash = (%$anonhash, name => "dave", city => "San Francisco", ... );
Another similar option is
@$anonhash{qw"name city ..."} = ("dave", "San Francisco", ...);
|
|---|