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

Re: In an array of arrays, how do I print the whole array or bits of it?

by jreades (Friar)
on Aug 30, 2000 at 19:39 UTC ( [id://30312]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @level1 = (
       [1, 2, 3, 4, 5],
       [6, 7, 8, 9, 10]
    );
    
  2. or download this
    for (my $i = 0; $i < @level1; $i++) {
         for (my $j = 0; $j < @{$level1[$i]}; $j++) {
              print STDOUT "\$i: " . $i . " \$j: " . $j . " value: " . $le
    +vel1[$i][$j] . "\n";
         }
    }
    
  3. or download this
    my @level1 = (
        [ 1, 2, 3, [4, 5] ],
    ...
            }
        }
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-24 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found