@a = (1,2,4,6,8); $a = @a; print $a; It gives you a FIVE, which is quite easy to understand, as it matches $#a.