in reply to Hash problem: each() failure
Note in the print statement I changed the '.' to a ','. The dot operator forces the hash into scalar context, which is rairly useful.my $Cls = {'P','a','N','b','U','c'}; print %$Cls,": \n\n"; while ( my ($k, $v) = each(%$Cls) ) { print "$k => $v\n"; }
|
|---|