One solution, perhaps not so elegant, is to use a global or local variable (but not a "my" I think) for %done. (C static, I forget how you do that in Perl offhand).
But there's something funny going on, because it *is* possible to pass a hash reference that you update, I've done it frequently I thought.
Maybe it's a syntax problem referring to the reference; I can't find an example where a hash reference is passed in, but when I dig one out of a structure in my working applications I see code like "if (keys(%{$picdb->{DBINFO}}))", that is, %{}.
Possibly using the right function template would help? (if only to make the calling sequence cleaner).
no subject
Date: 2006-12-20 06:33 pm (UTC)But there's something funny going on, because it *is* possible to pass a hash reference that you update, I've done it frequently I thought.
Maybe it's a syntax problem referring to the reference; I can't find an example where a hash reference is passed in, but when I dig one out of a structure in my working applications I see code like "if (keys(%{$picdb->{DBINFO}}))", that is, %{}.
Possibly using the right function template would help? (if only to make the calling sequence cleaner).