P
pod69
Hello,
I try to push on an array(global) a string and a hash ->
push(@array,{name => $n_name, hash => \%myhash});
now i try to read out everything but i have a problems with the array?
I try this to read everything out:
sub println {
for(my $i = 0; $i < scalar(@array) ; $i++ ){
print $array[$i]{name};
my %hash = $array[$i]{hash};
foreach $key ( keys %hash){
print $key." = ".$hash{$key}."\n"
}
}
}
the name gets printed out but not the hash?
thx
I try to push on an array(global) a string and a hash ->
push(@array,{name => $n_name, hash => \%myhash});
now i try to read out everything but i have a problems with the array?
I try this to read everything out:
sub println {
for(my $i = 0; $i < scalar(@array) ; $i++ ){
print $array[$i]{name};
my %hash = $array[$i]{hash};
foreach $key ( keys %hash){
print $key." = ".$hash{$key}."\n"
}
}
}
the name gets printed out but not the hash?
thx