Help for this page

Select Code to Download


  1. or download this
    my @foo = ( 1, 2, 3 );
    my $arrayref = \@foo;
    
  2. or download this
    my $arrayref = [ 1, 2, 3 ];
    
  3. or download this
    my @foo = ( 1, 2, 3 );
    
  4. or download this
    my @foo = ( [1], [2], [3] );
    
  5. or download this
    my $arrayref1 = [ 9, 10, 'a big fat hen' ];
    
    ...
    print Dumper $arrayref2;
    print "Showing both sub-structure and super-structure:\n";
    print Dumper $arrayref1, $arrayref2;
    
  6. or download this
        Only showing super-structure:
        $VAR1 = [
    ...
                  $VAR1,
                  $VAR1
                ];