Removing all elements in the array
@array = qw( zero one two three four five six seven eight nine );
print "@array.\n";
print "There are now ", scalar( @array ),
" elements in \@array\n";
@array = ();
print "@array.\n";
print "There are now ", scalar( @array ),
" elements in \@array\n";
Related examples in the same category