Help for this page

Select Code to Download


  1. or download this
    my $len;
    $len += length $_ for @many_strings;
    say $len;
    
  2. or download this
    use List::Util qw/sum/;
    say sum map {length $_} @many_strings;
    
  3. or download this
    use List::Util qw /reduce/;
    say reduce { $a + length $b } 0, @many_strings;