in reply to length of each element in an array?
for my $member (@array) { print length $member, "\n"; }
Or, if you like shorter code,
print length, "\n" for @array;
If you want to create an array of lengths, use map:
my @lengths = map length, @array;
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: length of each element in an array?
by G Nagasri Varma (Novice) on Dec 03, 2015 at 10:02 UTC | |
by choroba (Cardinal) on Dec 03, 2015 at 10:04 UTC | |
by G Nagasri Varma (Novice) on Dec 03, 2015 at 10:23 UTC |