#!/usr/bin/perl use warnings; use strict; print "Press enter to start\n"; my $dummy = <>; { my $a = []; my $i = 10000000; push @$a,$i while ($i--); print "Allocated first array - Press enter to let it go out of scope\n"; $dummy = <>; } print "Done. Press enter to continue with new array\n"; $dummy = <>; { my $a = []; my $i = 10000000; push @$a,$i while ($i--); } print "Done, press enter to exit\n"; $dummy = <>;