I still get an uninitialized variable for my @hashData.
Then it seems obvious that you're not loading a value with this line:
my @hashData = $hash{Scope}{model};
Side note: This should probably read more like:
my @hashData = @$hash{Scope}{model};
Never assume there is data where you expect it to be when it is coming from an outside source. Check it first. For example:
my @hashData = (); if (!defined $hash{Scope}{model}) { print "Scope and model missing!\n"; } else { @hashData = @$hash{Scope}{model}; }
...or something of that ilk.
In reply to Re^3: Accessing variables in an external hash without eval
by marinersk
in thread Accessing variables in an external hash without eval
by victorz22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |