Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Non-destructive array processing

by jmcnamara (Monsignor)
on Jan 20, 2003 at 22:19 UTC ( #228508=note: print w/ replies, xml ) Need Help??


in reply to Non-destructive array processing


I like this a little better:

for my $i (0 .. $#array/2) { my @chunk = @array[2*$i, 2*$i + 1]; print "Chunk: @chunk\n"; }

--
John.


Comment on Re: Non-destructive array processing
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2015-03-30 23:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (660 votes), past polls