Help for this page

Select Code to Download


  1. or download this
    foreach (@array) {
        dosomethingto($_);
    }
    
  2. or download this
    for (my $i = 0; $i < @array; $i++) {
        dosomethingto($array[$i]);
    }
    
  3. or download this
    my $fs = '';
    for (my $f = 0; $f < 10; $f++) {
    ...
        redo if length($fs) == 6;
    }
    print "fs: $fs\n";
    
  4. or download this
    my $gs = '';
    FOR_INIT:
    ...
        goto FOR_NEXT;
    FOR_LAST:
    print "gs: $gs\n";