Greg Oliver wrote:
> Example:
>
> # Main
> my $Results;
this only declare a $Results scalar
>
> # Initialized with 3 for every value
> # $Results{ $cty }{ $dom }{ $eng } = "3";
here, you are trying to use a %Results hash from $Results{ $cty }.
the '{ $dom }{ $eng }' portion does create a hash referece to the $cty
key...
if you have 'use strict', Perl will catch that for you
Ok, you are initialize your hohoh here to 3 ....
>
> foreach my $cty ( @Cities ) {
> foreach my $dom ( @Domains ) {
> my @Engines = ( sort keys %Engine_Urls );
> foreach my $eng ( @Engines ) {
> $Results{ $cty }{ $dom }{ $eng } = "3";
you are setting your hohoh to 3 again in here. why? isn't the init. above
not enought?
> my @out = ( $cty, $dom, $eng );
> &SomeSub( \@out );
> }
> }
> }
>
>
>
> sub SomeSub {
> my ($refdata) = @_;
> my ($cty, $dom, $eng) = @{$refdata};
> .....
> (modify some data)
> .....
> $Results{ $cty }{ $dom }{ $eng } = $newdata;
> }
if $newdata contains anything other than 3, it should got set to the new
value.
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]