Help for this page

Select Code to Download


  1. or download this
    use Data::Dumper;
    # your initialization code here
    print Dumper \%hash;
    
  2. or download this
    # WRONG
    $hash{"LISTS"}=[([]) x $length]
    
  3. or download this
    $hash{LISTS} = [ map [], 1..$length ];
    
  4. or download this
    my %hash;
    
    ...
    
    # also works for direct assignment:
    $hash{LISTS}[4][0] = 'other new item';