Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 ( #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? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-07-06 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?