This works for me from the command line. I like the "arrow" syntax for datastructures, as it allows me mind to see what's going on (which is hard for me to do sometimes with datastructures).
perl -e "$name{adams}{alice}='HELLO WORLD'; print $name{adams}->{alice};" The camel book has a ton of stuff on structures, and you may want to check out: perldoc perlreftut -and- perldoc perlref HTH, Matt --- Pete Emerson <[EMAIL PROTECTED]> wrote: > Suppose I have a two dimensional hash: > $name{Adams}{Alice}=1; $name{Adams}{Bob}=1; $name{Bull}{Adam}=1; etc. > > Given the first key, is there a way to pull out a second key, if I don't > care which one? Right now, I do: > foreach my $first (keys %{$name{Adams}}) { > $target=$first; > last; > } > > but it seems silly to have to run a loop like that and then cut out of > it after the first iteration. Thanks! > Pete > > -- > Those responsible for the signature have been sacked. > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]