Michael,
           thanks a lot Michael I figured it out using the Data
Dumper..Actually the last attribute wasnt initialised..I changed the code as
follows.
for ($i=0;$i<=$#terms;$i++)
{

$wordlistref->{$terms[$i]}->{"postingsref"}->{"doc"}->{"d1"}->{"termfreq"}++;
}
print
$wordlistref->{$terms[0]}->{"postingsref"}->{"doc"}->{"d1"}->{"termfreq"};
'2003' => {
                     'postingsref' => {
                                        'doc' => {
                                                   'd1' => {
                                                             ' ' => 1
                                                           }
                                                 }
                                      }
                   }

Corrected one
'2003' => {
                     'postingsref' => {
                                        'doc' => {
                                                   'd1' => {
                                                             'termfreq' =>
1
                                                           }
                                                 }
                                      }
                   }

On 12/11/06, Michael Peters <[EMAIL PROTECTED]> wrote:



Deepak Mallya wrote:
> Michael,
>              with no variable but just constants inside(I still get the
> same error) I am actually trying to build a complex data structure on
> the fly with dynamic values..what do I need to do?.

What line is the warning coming from? The line where you're doing the
increment?
Or the line where you're printing?

If you have doubt as to what your data structure looks like, use
Data::Dumper to
peak at it.

> for ($i=0;$i<=$#terms;$i++)
> {
>
>
$wordlistref->{$terms[$i]}->{"postingsref"}->{"doc"}->{"d1"}->{$termfreq}++;
> }
> print
>
$wordlistref->{$terms[0]}->{"postingsref"}->{"doc"}->{"d1"}->{$termfreq};

print Data::Dumper::Dumper($wordlistref);

--
Michael Peters
Developer
Plus Three, LP


Reply via email to