Perl: Function to print a HASH completely
Below is a perl function that i wrote to print a HASH completely. What i mean by ‘completely’ is that it will expand all hashes and arrays found within the given HASH. sub print_hash { my ($hash,$str) = @_; while( my ($k, $v) = each %{$hash}) { print $str."$k => $v\n"; if( $v =~ /hash/i