in reply to Re^2: Accessing variables in an external hash without eval
in thread Accessing variables in an external hash without eval
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.
|
---|