develooper Front page | perl.beginners | Postings from March 2002

Half asleep and need some aware eyes...

Thread Next
Nikola Janceski
March 5, 2002 14:18
Half asleep and need some aware eyes...
Message ID:
I am getting stuck... and I don't know what to do about this... And I am
half asleep. It has to be something stupid.

early in my code I populate %COOR with

push @{ $COOR{$file} }, $chgid;

Then later I try to use that info with:

foreach my $file (keys %NEW){
	while (my ($cfile, $ids) = each %COOR){
		if( grep $NEW{$file}[2] == $_, @{ $ids } ){   ## line 855
			$RELATION{$file} = $RELATION{$cfile};

but the error I get is:
Not an ARRAY reference at ./ line 855.

What the heck am I doing wrong??? Isn't COOR a hash of an array? 

In debug COOR looks like:
  DB<2> x %COOR
0  'src/'
1  ARRAY(0x3ab8a0)
   0  49196
   1  48544
2  'lib/xxxx.x'
3  ARRAY(0x3171f0)
   0  48641
4  'lib/xxxx.w'
5  ARRAY(0x30e510)
   0  49542
6  'lib/xxxx.x'
7  ARRAY(0x3173f4)
   0  49542
8  'include/xxxx.h'
9  ARRAY(0x30e42c)
   0  49124

Delivery Queue

Nikola Janceski
Summit Systems, Inc.

The only reason for time is so that everything doesn't happen at once.
-- Albert Einstein (1879-1955)  

The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About