http://www.perlmonks.org?node_id=117259

Madams has asked for the wisdom of the Perl Monks concerning the following question:

Hey all does any one know why this line

if ((exists $cacheHOA{$sum} ) && ($#{$cacheHOA{$sum}} <= 7)){...}


gives me the following error?

Can't use string ("c:\usr\local\bin\PixNews99\Downl") as an ARRAY ref +while "strict refs" in use at c:\usr\local\bin/md5summing.pl line 308 +, <STDIN> line 4.


I am running under -w and use strict;. %cacheHOA is a hash of arrays $sum is a an md5 hashval being used as a hash key. I don't understand why the string pops up (it is part of a file name for one of the files being checked) as i'm checking here to see if the key exists and that the anon array hanging off the key has seven or less members.

Dudes i'm stumped...

thanx
_________________
madams@scc.net
(__) (\/) /-------\/ / | 666 || * ||----||