I am ++'ing the value associated with $hash{"a"} but how
does this affect the $hash{"a"}->{Text} value?? I thought that the
end hash structure would look like this.
$hash{"a"} = 2;
$hash{"a"}->{Text} = "This is one";
$hash{"b"} = 3;
$hash{"b"}->{Text} = "This is two";
and output this....
a has val of ( 2 ) and text of 'This is one'
b has val of ( 3 ) and text of 'This is two'
...but it doesn't. Any help in understanding this would be greatly
appreciated.
#################################################
$hash{"a"} = 1;
$hash{"a"}->{Text} = "This is one";
$hash{"b"} = 2;
$hash{"b"}->{Text} = "This is two";
foreach $key (sort { $a cmp $b } keys %hash) {
print "$key has val of ( $hash{$key} ) and text of
'$hash{$key}->{Text}'\n";
}
print "\n\n";
foreach $key (sort { $a cmp $b } keys %hash) {
$hash{$key}++;
print "$key has val of ( $hash{$key} ) and text of
'$hash{$key}->{Text}'\n";
}
####################################################
thanks.
mike kangas
kan...@anlon.com