in reply to How to get the TOTAL length/size of an array?

TIMTOWTDI

use strict; use warnings; use Test::More tests => 3; my @many_strings = ("abc", "cd", "e", "fg", "hi", "hello world"); my $want = 21; is length (join '', @many_strings), $want, "length join"; { local $" = ''; is length "@many_strings", $want, "length interpolation"; } { my $len = 0; $len += length for @many_strings; is $len, $want, "sum over length loop"; }

🦛