> How can I recall only certain keys and their corresponding values of hashes > ex : if D_103 then print " D_103 value is 2" > ex :if D_101 then print "D_101 value is 0"
You may be looking for this: print "$_ value is $mycoolhash{$_}\n" if exists($mycoolhash{$_}); or more classically: if (exists($mycoolhash{$_})) { print "$_ value is $mycoolhash{$_}\n"; } - B -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/