in reply to Re: Taking arbitrary elements from an array
in thread Taking arbitrary elements from an array
was intended, I believe, to be:$mask >>= 1? $_: ();
but is actually equivalent to:($mask >>= 1)? $_: ();
This evaluates to true each time (1?) thus using each word ($_) as the value by which to shift $mask, and each of the strings evaluates to numerical zero. That's why $mask never changes, and gives you a 43 (0x2b) resulting from the map applied to each value from @ARGV;$mask >>= (1? $_: ());
|
|---|