http://www.perlmonks.org?node_id=932374

Jaapx has asked for the wisdom of the Perl Monks concerning the following question:

Hi Perl Monks,

I want to pass two hashes and a scalar to a subroutine and do a little work with them. Problem I'm getting is that the passed hashes don't seem to be recognized, as in, the if statement gives a "use of uninitialized value". Do you guys have any idea how to pass the hashes so that you can edit them? Many Thanks.

sub count_orientation($ \% \%){ my $ref = shift; my %x = %{(shift)}; my %y = %{(shift)}; $x{$ref}{amount}++; if ($y{$ref}{orientation} eq "for"){ $x{$ref}{amountFor}++; } else { $x{$ref}{amountRev}++; } } &count_orientation ($ref_end, %error_start, %score);