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:

  • comma operator in java
  • if tuple already exists cplex programming
  • python print round
  • how to convert string to double in jtable java
  • accessing password protected folder from java
  • how to convert data string in jtable as a double
  • How to compare strings in python
  • reading email with python
  • how to add a menu to jframe?
  • perl check ahash key exists

No comments yet.

Leave a Comment