- or download this
my $ref = [ $foo -> bar( $stuff) ];
- or download this
C:\test>p1
sub x1{ my @a; $a[ $_ ] = $_ for 1 .. 1e6; return @a };;
...
print time; $r = [ x1() ]; print time;;
1229112810.36413
1229112815.5985
- or download this
C:\test>p1
sub x2{ my @a; $a[ $_ ] = $_ for 1 .. 1e6; return \@a };;
...
print time; $s = x2(); print time;;
1229112742.05163
1229112742.43096