# a way to count the number of elements in a list my $count = 0; my @listOfThings = ('one', 'two', 'three'); map { ++$count } @listOfThings; print "There are $count things in your list of things.\n";