That's gonna blow up if $key can ever be "db". You can't have $config{db} be both a hashref and a simple value.$config{'db'}{"$key"} = $val; $config{"$key"} = $val;
Also, those double quotes are useless, as are the single quotes around db.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: more fun w/ HASh ref's
by merlyn
in thread more fun w/ HASh ref's
by hesco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |