Help for this page

Select Code to Download


  1. or download this
    use Data::Dumper;
    print(Dumper(\%db));
    
  2. or download this
    foreach $key (keys(%db)) {
       for ($record_num=0; $record_num<@{$db{$key}}; $record_num++) {
    ...
          }
       }
    }
    
  3. or download this
    foreach $key (keys(%db)) {
       foreach $record (@{$db{$key}}) {
    ...
          }
       }
    }
    
  4. or download this
    # From ref to array of fields:
    push(@{$db{$key}}, $record);
    ...
    -or-
    # From a array of fields that will change:
    push(@{$db{$key}}, [ @fields ]);
    
  5. or download this
    # Gives:
    #    key1,field1,field2,field3,field4
    ...
          print $key, $record_num, @{$db{$key}[$record_num]};
       }
    }