in reply to Wanted further clarification on Data Usage
I don't see any real problems with it (other than the fact that I prefer to group function definitions and not mix them with the rest of the code). The my (%HASH) has the effect of localizing the %HASH variable to the block where the doStuff function is declared, effectively making it invisible to everyone else and accessible only through that function. In this sense it is a good thing to have the my statement. If you remove it, the %HASH variable will be accessible from other parts in the program, which may or may not be what you want.
You mention %thisDataset a couple of times, but there is no such variable in your program. You have %HASH, and you have $thisDataset, which is a pointer to %HASH.
The use of %{$_[0]} in the second function looks good to me, but the @{$_{$KEY}} does not. I think it should be @{$_[0]->{$KEY}}. It may make things clearer to assign $_[0] to another variable, like this:
sub someThingElse { my $data=shift; # then you can use %{$data} and @{$data->{$KEY}} }
--ZZamboni
|
---|