@x = @{$a}; foreach my $i (@x) { print"$i\n"; undef $i; }