in reply to Passing hashes to subroutines

Hashes must be passed by reference, which means they're nothing more than a single scalar value (in terms of an arguement to a subroutine) If you don't pass its reference, instead just do foo(%hash) then what you're really passing in is an even paired list. HTH.

use strict; use warnings; my %hash1; $hash1{hello} = "world!"; foo(\%hash1); foo( { hello => 'world!!' } ); sub foo { my %hash2 = %{$_[0]}; print "hello " . $hash2{hello} . "\n"; } #output #hello world! #hello world!!