Hello,

On Wed, 11 Feb 2004 07:20:45 -0700
"Wiggins d Anconia" <[EMAIL PROTECTED]> wrote:

> But lets not go there first. What is with all of the copying in and
> out of hashes?  What is the point? Generally you shouldn't need to do
> this type of thing, it usually indicates a problem elsewhere.  A hash
> is usually a more useful data structure so pulling single values out
> and munging a bunch of scalar variables *usually* isn't the way you
> want to go about it.... so what are you really doing?  Why don't you
> want to work with the values while they are in the %dbm_hash?

I know, I am going to switch over into that direction. I justed wanted
to make sure the program works at all, while being able to test if the
DBM is read correctly... 
Thus I had local variable filled with default values (so they wouldn't
overwrite the values in the DBM-hash) and then override them with the
values in the DBM-hash, if there were any. This way, if there was no
value given in the DBM-hash for a certain setting, the program would not
end up with invalid or empty values.

Since it works now, I can get rid of the local variables. 
But still, I need two hashes, one for the default values, one for the
overrides.
The program allows you to change settings at run-time as well as change
values in the dbm-hash - I don't want local-settings to go into the
dbm-hash unless I explicitly choose to. 

Thanks, 

kind regards,

Benjamin
 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to