Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Slices of 2D arrays?

by broquaint (Abbot)
on Jun 06, 2003 at 15:29 UTC ( [id://263711]=note: print w/replies, xml ) Need Help??


in reply to Slices of 2D arrays?

Because slicing takes place on a single array, there isn't a cleaner method than using the map solution you provided, although, you can drop the @ary[0 .. $#ary] for a simple @ary e.g
my @ary = ( [ 1 .. 3 ], [ 4 .. 6 ], [ 7 .. 9 ] ); print map $_->[0], @ary; __output__ 147

HTH

_________
broquaint

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-19 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found