if you are calling it with this:my($userdb,%group) = @_;
&GroupCreate($userdb,\%group);
You are sending the sub a scalar (I assume) and a hashref, but the assignment
is trying to assign a hash, not a hashref, and therefore expecting the parameters after $userdb to be a list (i.e. the contents of the hash itself). As an alternative, try:my($userdb,%group) = @_;
my ($userdb,$groupref) = @_; my %group = %$groupref;
my ($userdb,$group) = @_;
FWIW, thats what:
[Thu Feb 2 22:29:32 2006] test-auth5.cgi: Odd number of elements in h +ash assignment at /var/wwwssl/auth-test/test-auth5.cgi line 379.
is telling you.
Update: all the uses of %group in the sub appear to be addressing a hashref $group, with the exception of the assignment, so there's no need to dereference it at all.
--------------------------------------------------------------
"If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."
John Brunner, "The Shockwave Rider".
In reply to Re: Confused Still by Hash Refs
by g0n
in thread Confused Still by Hash Refs
by hesco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |