in reply to length of each element in an array?

You need to iterate over the array and call length for each of its members.
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
    for my $member (@array)
    {
    print length $member, "\n";
    }

    The above option worked fine.I am able to view the length of each element in an array. But I want the list of elements of length greater than n size to be sent to a new array.
      Great! You should have said it earlier. That's exactly the task for grep:
      my @longer = grep $n < 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,
        Thanks,It worked.