foreach ( 1, 2, 3 ) { my @array; print "Iteration $_: \@array has just been declared in scope.\n"; @array = ( int(rand(5)), int(rand(5)), int(rand(5)) ); print "\@array has been assigned: @array\n"; print "\@array is now falling out of scope; contents gone forever.\n"; }