in reply to printing contents of a hash

Hello merrittr,

If you just want to print out a particular key/value pair, and you know the key, use something like print $key, ', ', $reg_coes{$key} (or $reg_coes->{$key} if $reg_coes is a hash reference). But I assume you want to print out the whole hash, in which case see the FAQ How do I process an entire hash? for various approaches.

An alternative is to use a module such as Data::Dumper or (my usual preference) Data::Dump. For the latter, you just do:

use Data::Dump; ... dd \%reg_coes;

and the module does the hard work for you.

Note that hashes are unsorted, so if you want to print out the contents in a particular order, you need to impose that order manually, as shown in the FAQ.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,