in reply to Passing multiple hashes?
Perl passes everything to your subroutine in the @_ array, so it can't tell where one hash ends and the other begins. Everything will end up in your first hash, as you've found.
TIMTOWTDI, but probably the easiest is to pass references instead:
sub register { my ($eref, $fref) = @_; my %error = %$eref; my %FORM = %$fref; # ... } # # Call it like so: # register(\%error, \%FORM);
HTH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing multiple hashes?
by Monolith-0 (Beadle) on Dec 12, 2001 at 08:07 UTC |