A little quick trick to empty an array in Perl is to set its length to a negative number.
Have fun!@
my @fruit = qw[ apple orange berry ];
print "Before: Fruit array has ".scalar( @fruit )." elements.\n";
$#fruit = -1;
print "After: Fruit array has ".scalar( @fruit )." elements.\n";