Help for this page

Select Code to Download


  1. or download this
    for (my $i = 0; $i<3; $i++) {
        my $str = "$i\n";
        push @d, sub { print $str };
    }
    
  2. or download this
    for (my $i = 1; $i<=3; $i++) {
        my $str = "$i\n";
        push @d, sub { print $str };
    }
    
  3. or download this
    for my $i (1..3) {
        my $str = "$i\n";
        push @d, sub { print $str };
    }