in reply to Stumped on an array ref error...

using the last index ($#) requireds an array.
($#{$cacheHOA{$sum}} is trying to use it on a scalar, not an array. This is untested, but maybe ($#{@{$cacheHOA{$sum}}} would work.

Update Well,I'll be damned.

Replies are listed 'Best First'.
Re: dereference the array ref
by Madams (Pilgrim) on Oct 07, 2001 at 07:05 UTC
    Hey boo_radley

    Tried your possible fix but that gives me the EXACT same error msg.

    P.S: the last array index operation on that line comes straight from perldsc

    sigh...
    _________________
    madams@scc.net
    (__) (\/) /-------\/ / | 666 || * ||----||
Re: dereference the array ref
by wog (Curate) on Oct 07, 2001 at 07:06 UTC
    For the record, this is not correct. An arrayref can be used where an array name would otherwise appear, and thus Madams syntax is correct.