scalar is unnecessary due to context. This is an idiom I like.
my $data = data(); my $count = @{ $data || [] };
In reply to Re: Count elements in array ref
by Your Mother
in thread Count elements in array ref
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |