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