Help for this page

Select Code to Download


  1. or download this
    for my $element (@array) {
        print "$element\n\n";
    ...
    
    # or using for as a statement modifier
    print "$element\n\n" for @array;
    
  2. or download this
    for (0..$#array) {
        print "$array[$_]\n\n"
    }