In Perl, the array itself in scalar context gives the number of elements:
No function necessary.my @foo = qw/foo bar baz/; my $foocount = @foo; print $foocount, $/; print scalar(@foo), $/;
After Compline,
Zaxo
In reply to Re: perl equivalent to php array count function
by Zaxo
in thread perl equivalent to php array count function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |