in reply to Hash problem: each() failure

Was ist rather this you wanted?
my %Cls = ('P' => 'a',
           'N' => 'b',
           'U' => 'c');
print %Cls.": \n\n";
foreach $a (keys(%Cls)) {
    print "$a => $Cls{$a}\n";
}