Help for this page

Select Code to Download


  1. or download this
    my %hash = ('First' => 1, 'Second' => undef );
    print "First\n" if exists $hash{'First'};
    ...
    __OUTPUT__
    First
    Second
    
  2. or download this
    while ( my ( $key, $val ) = each %hash ) {
        delete $hash{$key} if not defined $val;
    }