Problem by pushing a String and a Hash on an array!
- From: pod69@xxxxxxx
- Date: 30 Dec 2006 13:46:47 -0800
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
.
- Follow-Ups:
- Re: Problem by pushing a String and a Hash on an array!
- From: Mumia W. (on aioe)
- Re: Problem by pushing a String and a Hash on an array!
- From: Tad McClellan
- Re: Problem by pushing a String and a Hash on an array!
- From: Paul Lalli
- Re: Problem by pushing a String and a Hash on an array!
- From: Gunnar Hjalmarsson
- Re: Problem by pushing a String and a Hash on an array!
- Prev by Date: Re: Assigning pattern matches to an array
- Next by Date: Re: Assigning pattern matches to an array
- Previous by thread: MIDI::Score: Duration < 0, Adding Events, Native NRPNs?
- Next by thread: Re: Problem by pushing a String and a Hash on an array!
- Index(es):
Relevant Pages
|