my $num = grep{1}@a; print $num; ##prints 5 (num of elements in @a) ie, abcd!