Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Separating Compound Lists

by Roy Johnson (Monsignor)
on Feb 11, 2005 at 02:40 UTC ( [id://429971]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @sets;
    for my $x (1..3){
    ...
    }
    use Data::Dumper;
    print Dumper(\@sets);
    
  2. or download this
    my @sets = map {
      my $x = $_; # Copy outer loop variable
      my @products = map { $x ** $_ } (1..3);
      \@products;
    } (1..3);
    
  3. or download this
    my @sets = map {
      my $x = $_; # Copy outer loop variable
      [map { $x ** $_ } (1..3)];
    } (1..3);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found