Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: A more concise way to map the contents of an array.

by muba (Priest)
on Dec 30, 2012 at 13:23 UTC ( #1010919=note: print w/replies, xml ) Need Help??


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]

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1010919]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2016-09-30 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (569 votes). Check out past polls.