Help for this page

Select Code to Download


  1. or download this
    my %dupes = (); # name->count
    my $dref = \%dupes;
    
  2. or download this
      @file_info = qw(data1 data2 data3);
      %files = (
         X  => \@file_info
      )
    
  3. or download this
      $file_info_ref = $files{X};
      push @$file_info_ref,'data5';
    ...
      or
    
      push @{$files{X}}, 'data5'
    
  4. or download this
    my %fileinfo;
    my %dupes;
    ...
       # No need to re-store it in the hash, because $fileinfo{$_} 
       # and $saved_info both point to the same array
    }