I have a Hash within an if-declaration (which is also in an foreach Loop). Outside of this loop, there is only the last entry of the hash left.
Why? And how can I receive the other 25 entries of the hash outside the declartion?
I really don't know, why this is happening.
$nodeset finds the right node in the document, which is the inputfile I want to check
foreach my $node ($nodeset->get_nodelist)
#this line below is just for checking, what can be found within
my $a = $node->getAttribute('a');
my $b = $node->getAttribute('b');
my $c= $node->getAttribute('c');
if((defined $a) && (defined $b) && (defined $c))
@arr_a = split (/ /, $a);
@arr_b = split (/ /, $b);
@arr_c = split (/ /, $c);
print "Warning! \n";
print Dumper %complete;
--> but here is the Problem. Outside of the Loop, there is only the last hash-element left.
I hope someone can help me and explain me whats the error.