Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Clever map / foreach algorithm sought

by Sidhekin (Priest)
on May 03, 2002 at 14:02 UTC ( #163787=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @x = (4, 4, 2);
    my $pref = 'XX';
    
    my @y = map {my $chunk=$_; map{sprintf("$pref%02d:",$chunk).$_}1..$x[$
    +chunk-1]}1..@x;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2022-08-18 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?