D
David
Dear all,
How does one get the number of non-empty elements in an array? The
following snippet prints '3', I only want to count the non-empty
elements.
Thanks!
#!/usr/bin/perl
use strict;
local $\ = "\n";
my @arr = qw ( sissors paper undef );
print scalar @arr;
How does one get the number of non-empty elements in an array? The
following snippet prints '3', I only want to count the non-empty
elements.
Thanks!
#!/usr/bin/perl
use strict;
local $\ = "\n";
my @arr = qw ( sissors paper undef );
print scalar @arr;