use strict; use warnings; my @a = (1,2,3); undef @a; $a[1] = 2; @a = undef; $a[1] = 2;