Help for this page

Select Code to Download


  1. or download this
    while( my $k = each %hash ) { ... }
    foreach my $k ( keys %hash ) { ... }
    
  2. or download this
    while( my ( $k, $v ) = each %hash ) {
    
  3. or download this
    foreach my $k ( keys %hash ) {
        my $v = $hash{ $k };
    
  4. or download this
    sub each_iter(%) {
        my $hash = shift;
    ...
    
    my $iter = each_iter %some_hash;
    while( my ( $k, $v ) = $iter->() ) {