Help for this page

Select Code to Download


  1. or download this
    my @count = qw/1 2 3 4/;
    
    while ( my ( $iter, $value ) = each @count ){
    ...
          print "$iter: three!\n";
        }
    }
    
  2. or download this
    0: one
    1: HA!
    2: three!
    3: three! # This is a very special case where 4 == three :-)
    
  3. or download this
    my @count = qw/1 2 3 4/;
    
    while ( my ( $iter, $value ) = each @count ){
    ...
          print "$iter: three!\n";
        }
    }
    
  4. or download this
    0: one
    1: HA!
    2: HA!
    3: HA!