"The Ghost" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have keys with periods in them: > > my %hash; > $hash{something.withaperiod}="some text"; > my $something='something'; > my $withaperiod='withaperiod'; > print qq{$hash{"$something.$withaperiod"}\n}; > > > what will it print?
Looking at what you are trying to do here, I'm guessing you are trying to "emulate" a complex data structure. You should just use one instead: my %hash; $hash{something}{withaperiod}="some text"; my $something='something'; my $withaperiod='withaperiod'; print qq{$hash{$something}{$withaperiod}\n}; That way you can use perl's built in constructs to iterate over the data when you need to: my $subhash = $hash{something}; foreach my $key ( keys %$subhash ) { print("$key => $subhash->{$key}"); } trwww -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>