in reply to hash name as a variable?
while (($key,$value) = each %$DB_name) {
This code attempts to use $DB_name as a symbolic-reference to find the hash to be indexed. Strict-mode forbids symbolic-references because they don't work with lexical (my) variables. When you turn off strict you get the package variable %IWSTEST (or whatever is in $DB_name) which doesn't exist since you declared your hashes with my().
Ok, so now you know what the problem is, how should you solve it? Here are two options:
my %name_to_hash = ( ISWTEST => \%ISWTEST, ISWLIVE => \%ISWLIVE, #...); while (($key,$value) = each %{$name_to_hash{$DB_name}}) { #...
Give it a try and post a new question if you're still having trouble.
-sam
|
|---|