Help for this page

Select Code to Download


  1. or download this
    foreach ( 0..@#array ) {...
    
  2. or download this
    foreach ( @array ) {.....
    
  3. or download this
    foreach ( @first_array ) {
         foreach ( @second_array ) {
              print "$_\n";
         }
    }
    
  4. or download this
    foreach my $outter_element ( @outter_array ) {
         foreach ( @inner_array ) {
              print "$outter_element, $_\n";
         }
    }
    
  5. or download this
    foreach ( @outter_array ) {
         my $outter_element = $_;
    ...
              print "$outter_element, $_\n";
         }
    }
    
  6. or download this
    print "$_\n" foreach @array;
    
  7. or download this
    foreach ( @array ) {
         print "$_\n";
    }