for( 1 .. 100 ) { my @array; my $c = 0; while( $c++ < 500_000 ) { push @array, rand; } print "\@array holds ", scalar( @array ), " elements.\n"; }