Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 lurking in the Monastery: (2)
As of 2014-09-20 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (152 votes), past polls