Help for this page

Select Code to Download


  1. or download this
    
    while (my ($key, $value) = each %my_hash) {
    ...
       . # some processing on the element
       .
    }
    
  2. or download this
    for my $key (keys %my_hash) {
       my $value = $my_hash{$key}    # and no need to change the code belo
    +w
    ...
       . # some processing on the element
       .
    }
    
  3. or download this
    for my $key (my @temp = keys %my_hash) {
       my $value = $my_hash{$key}    # and no need to change the code belo
    +w
    ...
       . # some processing on the element
       .
    }