Forget it... found it... it was $NEW{$file}[2] that was wrong... %NEW is actually a hash of a hash of an array. forgot the second key.
> -----Original Message----- > From: Nikola Janceski > Sent: Tuesday, March 05, 2002 5:18 PM > To: '[EMAIL PROTECTED]' > Subject: Half asleep and need some aware eyes... > > 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}; > last; > } > } > } > > but the error I get is: > Not an ARRAY reference at ./depend.pl 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/xxx.cc' > 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 > <http://www/reldist-bin/build/assign/listassign.cgi?reverse=on> > > Nikola Janceski > Summit Systems, Inc. > 212-896-3400 > > 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. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]