I have two problems here 1.Hash values are getting printed as array references. 2.I need to print "only the keys and it's corresponding values" if a value is present for the key
I tried to use your suggestion but getting the following warning exists argument is not a HASH or ARRAY element at orphan_plf.pl line 58
foreach my $key ( keys %Hash_filematches ) { my $value = {$Hash_filematches{$key}}; print "$key => $value\n" if(exists {$Hash_filematches{$key}}); }
In reply to Re^2: Printing only the "keys that have a value" in hash
by iphone
in thread Printing only the "keys that have a value" in hash
by iphone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |