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 } <BR>";
}
It works!! :-)
Thanks
Jerry
"Brett W. McCoy" wrote:
> On Fri, 14 Sep 2001, Jerry Preston wrote:
>
> > $test{ 1 } = "i am lost";
> > $test{ 2 } = "what is your name";
> >
> >
> > print "1 $test{ 1 } <BR>"; # 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 } <BR>";
> > }
> > }
>
> You are trying to derefence something that can't be dereferenced.
> $test{$j} is not a hash reference, as you are trying to make it out to be.
> What is it you are trying to do?
>
> -- Brett
> http://www.chapelperilous.net/
> ------------------------------------------------------------------------
> It's OBVIOUS ... The FURS never reached ISTANBUL ... You were an EXTRA
> in the REMAKE of "TOPKAPI" ... Go home to your WIFE ... She's making
> FRENCH TOAST!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]