my $a = ['a', 'b', 'c']; foreach (@{$a}) { my $i = $_; print"$i\n"; undef $i; }