for ( $i = 1; $i <= 5; ++$i ) { push( @array, $i ); # add $i to end of @array print "@array\n"; # display current @array }