in reply to hash of hashes of lists!!!

line 176 is
foreach $key (sort keys %$hashOfFiles) { #LINE 176 foreach my $file (sort keys %$key) { my ($mode2, $user2, $group2, $size2, $mtime2, $filename, $f +ilepath) = @{$hashOfFiles->{$key}->{$file}}; print "$file - $filename, $filepath, $mode2 $user2, $group2, $ +size2, $mtime2<br>"; } }
I am using arrays and not lists. Sorry for not making it clear. I am updating my code from a previous version so i am sure that the array works fine.

You said: $foo->{bar}->{baz}
The failure is recognising 'bar' as a scalar rather than a hash and is (i think) nothing to do with 'baz' being a scalar or array.

Replies are listed 'Best First'.
Re: Re: hash of hashes of lists!!!
by Juerd (Abbot) on Apr 05, 2002 at 15:15 UTC

    The failure is recognising 'bar' as a scalar rather than a hash and is (i think) nothing to do with 'baz' being a scalar or array.

    bar is an unquoted string, baz is an unquoted string.
    $foo->{bar} is a scalar, holding a hash reference.
    %{ $foo->{bar} } is the hash to which $foo->{bar} is refering.
    $foo->{bar}->{baz} is a scalar.

    U28geW91IGNhbiBhbGwgcm90MTMgY
    W5kIHBhY2soKS4gQnV0IGRvIHlvdS
    ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
    geW91IHNlZSBpdD8gIC0tIEp1ZXJk