Help for this page

Select Code to Download


  1. or download this
    my $i;
    
    for $i (1..8) {
        print "$i\n";
    }
    
  2. or download this
    for $i (1..8) {
        push( @ref_list, sub { print "    \$i == $i\n" } );
    }
    
  3. or download this
    my ( @ref_list, $i, $j );
    
    ...
    &{$ref_list[0]};
    $j = 20;
    &{$ref_list[0]};
    
  4. or download this
    for ($i = 1; $i <= 8; $i++ ) { 
        push( @ref_list, sub { print "    \$i == $i\n" } );
    }