in reply to Passing multiple hashes?
Then do register(%foo), and now the @_ variable inside register might be like this:%foo = ( 'bar' => 'baz', 'qux' => 'quux', );
$_ = 'bar'; $_ = 'baz'; $_ = 'qux'; $_ = 'quux';
It's almost like you called it with register('bar' => 'baz', 'qux' => 'quux'). And remember that => is just a comma operator which quotes the left argument, so that's like doing: register('bar', 'baz', 'qux', 'quux').
Note how my assignment to %foo above is like assigning a list ('bar' => 'baz', 'qux' => 'quux') to %foo. So, what happened when you did
is the elements of array @_ were assigned to %error, where %error gobbles up all the list passed to it because it doesn't know where to stop.my (%error, %FORM) = @_;