in reply to
Re^2: undefined elements in array
in thread undefined elements in array
I think you meant grep, not map:
0:14 >perl -wE "@a = (1,2,3,undef,5); say scalar @a; @b = map(defined
+, @a); print join(',', @b);"
0:14 >perl -wE "@a = (1,2,3,undef,5); say scalar @a; @b = grep(define
+d, @a); print join(',', @b);"
Hope that helps,
I make decisions, and my brain carries them out
My brain makes the decisions, and I observe them (if I'm lucky)
I make some decisions, and my brain makes others
My spouse makes decisions and I and my brain carry them out
I wrote a program to relieve me and my brain from the burden of decision-making
The black-helicopter people project the decisions into my brain and then I do as ordered
Results (498 votes),