Hi SavannahLion,
You are reassigning to $x each time through the loop. Add to it instead:
$x += length for @t[0..1];
Hope this helps!
In reply to Re: length of string in array
by 1nickt
in thread length of string in array
by SavannahLion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |