in reply to Re: A more concise way to map the contents of an array.
in thread A more concise way to map the contents of an array.
I don't think it gets much more concise than that. However, yet another way to achieve the same would be
@cell_contents = map { $_ and 1 or 0 } @$array_ref[3..10]
|
---|
In Section
Seekers of Perl Wisdom