Help for this page

Select Code to Download


  1. or download this
    # 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";