Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: perlish mapping a list to triples

by ambrus (Abbot)
on Jun 06, 2004 at 18:28 UTC ( [id://361789]=note: print w/replies, xml ) Need Help??


in reply to perlish mapping a list to triples

You asked for a perlish way, so here is it. (Or at least this is my idea of perlish.) (A lispish way would be a tail-recursive function.)

use Data::Dumper; @arr= 1..18; (@{$aoa[@aoa]}[0..2], @arr) = @arr while @arr; $aoa= [@aoa]; print Dumper $aoa;

Update: hihi, I've just seen the sign under the post:

bottled water

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-23 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found