Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Perl: Check if a key exists in the hash

Perl: Check if a key exists in the hash

# create an Hash
%myHash = ( "january"  => 31,
          	  "February"  => 28,
              "March" => 31,
              "April"  => 30,
              "May"  => undef );
  print "This entry already exists";
 # Add non existent entry
 # print Hash items
foreach my $item (keys %myHash)
    print "$item=>$myHash{$item}n";

Users who found this page were searching for:

  • python hash entry exists
  • check if key exists in referenced hash perl
  • python convert string to number
  • reading email with python
  • accessing password protected folder from java
  • how to underline the string in java
  • how to convert string to double in jtable java
  • comma operator in java
  • how to calculate fibonacci programing
  • python print round

No comments yet.

Leave a Comment