I get wrong output trying to derefenced an pointer to a hash which is a value of a key in another hash. Here is the codes and output. START OF CODE SNIPPET: ====================== my $lineread = readline($fhandle);

The part of the WHILE LOOP in map_values() is not executed, as the hash that is dereferenced into my %testhash = %$mapval; contain no keys & values?? how do I dereferenced that I can display this hash as indicated as -> HASH(0x24b0d24) which is clealry a pointer to a hash. The code my %testhash = %$mapval; surelu looks normally correct in the way to dereferenced a hash.??

As well as why does the hash pointer have the same memeory address it should be different for each hash as there are three hashes created in the loop of pencodes_ptr