--- [EMAIL PROTECTED] wrote: > Martin, thanks for the response. Yes there are > multiple servers and I tried to simplify the code > since I wasn't providing a full script. This can > also help me minimize hard coding throughout the > script.
Avoiding hard coding - always a good thing... :-) When you start making large hash data structures, it's important to work out what you wish to do with the config information at 'runtime'. Just so you minimise looping through the structure, rather than being able to go straight to the data you want - which it looks like you are doing anyway:-) May I suggest that you build a hash Reference though, instead of a hash itself... or perhaps, if this data is not going to be 'dynamic' e.g. overwritten, manipulated etc... that you could in fact define it as a constant... use constant CONF => { 'DEV' =>{ ...... } } then my $ssh= CONF->{$dev}->{..}....->{sshconn}; If you plan to run this under mod perl or some other kind of daemon or stay alive type process, or if you do any forking, then defining constants for config info will ensure memory usage is kept to a minimum.... If your script simply starts and then stops then it won't be an issue either way... regards Marty Send instant messages to your online friends http://uk.messenger.yahoo.com _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs