G
Guest1
Hi,
I have something like:
$value = 'A' 'C' 'G';
and I would like store this value on a hash table.
my @value = split(' ',$value);
print "=>\t@value[1]\n"; # print: => C;
($splitted_hap{$key}) = @value;
while trying to print the values:
print "\n";
while ( (my $key, my @value) = each(%splitted_hap) ) {
print "$key\t$value[0]\n";
print "$key\t$value[1]\n";
}
I get:
first A
first
second C
second
third A
third
why the values are not been stored on value[1]
what I am doing wrong?
Thanks for your help
Pedro
I have something like:
$value = 'A' 'C' 'G';
and I would like store this value on a hash table.
my @value = split(' ',$value);
print "=>\t@value[1]\n"; # print: => C;
($splitted_hap{$key}) = @value;
while trying to print the values:
print "\n";
while ( (my $key, my @value) = each(%splitted_hap) ) {
print "$key\t$value[0]\n";
print "$key\t$value[1]\n";
}
I get:
first A
first
second C
second
third A
third
why the values are not been stored on value[1]
what I am doing wrong?
Thanks for your help
Pedro