Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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]


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

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 imbibing at the Monastery: (3)
As of 2015-07-28 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (259 votes), past polls