in reply to memory deallocation

my $i=0 , @X ;

Nope. Consider:

my $i=0 , @X; print "\@X is a global!\n" if defined $main::{X}; __END__ @X is a global!

You want:

my ($i, @X) = 0; # $i gets the zero, @X gets nothing

or better

my $i = 0; my @X;

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}