Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Chess Board Single Loop

by davido (Cardinal)
on Oct 03, 2013 at 21:01 UTC ( [id://1056796]=note: print w/replies, xml ) Need Help??


in reply to Chess Board Single Loop

Is this what you mean?

use Data::Dumper; my @array; for my $i ( 0 .. 63 ) { push @array, [] if $i % 8 == 0; push @{$array[-1]}, $i; } print Dumper \@array;

Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-16 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found