Re: Can't count array in hash in array

2006-08-09 Thread Rob Dixon
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?

Re: Can't count array in hash in array

2006-08-09 Thread John W. Krahn
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? >

Re: Can't count array in hash in array - correx

2006-08-09 Thread James Marks
On Aug 9, 2006, at 12:59 AM, Beginner wrote: 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(

Re: Can't count array in hash in array - correx

2006-08-09 Thread Beginner
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

Re: Can't count array in hash in array - correx

2006-08-09 Thread James Marks
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

Re: Can't count array in hash in array

2006-08-09 Thread James Marks
On Aug 9, 2006, at 12:40 AM, Beginner wrote: On 9 Aug 2006 at 0:33, James Marks wrote: Ohh ohh. I think I know this (they'll flame me if I'm wrong). Is it? use strict; use warnings; my $no_dirs = @{ $web_sites_directory_tree[$i]{subdirectory} }; I tried that (including strict/warnings

Re: Can't count array in hash in array

2006-08-09 Thread Beginner
On 9 Aug 2006 at 0:33, James Marks wrote: Ohh ohh. I think I know this (they'll flame me if I'm wrong). Is it? use strict; use warnings; my $no_dirs = @{ $web_sites_directory_tree[$i]{subdirectory} }; I hope I'm right..fingers crossed. Dp. > # COUNT NUMBER OF DIRECTORIES - (THIS WORKS)

Can't count array in hash in array

2006-08-09 Thread James Marks
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? my @web_sites_directory_tree