If you're trying to build up the array with pushes, maybe try this:
push @$hash{'Element'}, (1, 2, 3, 4, 5);
The paranthesis are redundant, and are just there to make the list visually obvious.
If you're adding one item at a time inside a loop it might look more like this.
push @$hash{'Element'}, $item;
Or if you've got another array you're adding you could do it this way:
push @$hash{'Element'}, @array;
If you're building the array up in one step you could do it this way, and additional elements could still be pushed onto it later:
$hash{'Element'} = [1, 2, 3, 4, 5];
I would have to see a snippet of five or ten lines of code that exhibits the misbehavior you're describing before I could comment on what's wrong. Post a small segment of code that shows the problem and maybe we can help figure it out. FWIW, there isn't anything special about a hash of arrays that would make scoping different for that entity than for some other entity.
Dave
"If I had my life to do over again, I'd be a plumber." -- Albert Einstein |