On 9 Aug 2006 at 0:54, James Marks wrote:

> 
> On Aug 9, 2006, at 12:33 AM, James Marks wrote:
> 
> > Down, near the bottom of this example code (marked), I'm trying to 
> > count the number of elements of an array which is the value of a key 
> > in a hash which is, itself, an element of an array. So far, I've been 
> > unsuccessful and I'm stumped as to what to try next.
> >
> > Help?
> 
> Oops. I accidentally typed $i instead of $j in second for loop in 
> previous example. This is more correcter:
> 

Are you using this

 $subdirectory_count = $web_sites_directory_tree[$i]{subdirectory};

or this.

my $subdirectory_count = 
@{$web_sites_directory_tree[$i]{subdirectory} };

print "SUB= $subdirectory_count\n";

Because the first outputs:

SUB= array(0x2250f8)
SUB= array(0x18614b4)

and the 2nd outputs:
        SUB= 6
        SUB= 3
 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to