Brett,
This!
$test{string}{ 1 } = "i am lost";
$test{string}{ 2 } = "what is your name";
foreach $id ( keys %{ $test{string} } ) {
print "$id $test{string}{ $id } ";
}
It works!! :-)
Thanks
Jerry
"Brett W. McCoy" wrote:
> On Fri, 14 Sep 2001, Jerry Preston wrote:
>
> > $test
On Fri, 14 Sep 2001, Jerry Preston wrote:
> $test{ 1 } = "i am lost";
> $test{ 2 } = "what is your name";
>
>
> print "1 $test{ 1 } "; # this works
>
> # but not this! Why?? Is there a better way to write this?
>
> for( $j = 1; $j < 3; $j++ ) {
> foreach $id ( keys %{ $test{ $j } } ) {
Hi!
Can I do this?
$test{ 1 } = "i am lost";
$test{ 2 } = "what is your name";
print "1 $test{ 1 } "; # this works
# but not this! Why?? Is there a better way to write this?
for( $j = 1; $j < 3; $j++ ) {
foreach $id ( keys %{ $test{ $j } } ) {
print "$id $test{ $j }{ $id } "