hi felix

the exists check works nicely :)

but i cant get the print to work, using my version of your sub:

sub print_record
{
   my ( $record_key ) = @_;
   my $record;
   my $records;

   # read in records
   $records = &read_recordfile;

   foreach $record ( keys %{ $records->{ $record_key } } ) {
      print "debug" . join('', @{ $records->{ $record_key }{ $record } } );
   }

   return $record
}
                              
$record_key is passed to the subroutine ok (i did check). and the records are read (i 
did check using Data::Dumper)

>     print_record($records, 'bleh');
> 
>     sub print_record {
>         my $source = shift;
>         my $key = shift;
>       
>         return unless exists $source->{$key};
>         print "Contents of record with primary key $key:\n";
>         foreach my $field (sort keys %{$source->{$key}}) {
>             print "\t$field: ";
>             print "[" . 
>                   join(", ", @{$source->{$key}{$field}}) . 
>                   "]\n" ;
>         }
>          print "\n";
>         return;
>     }
> 
> But I have a question: what is the functional difference between 
> "[]" and "['']" in your columns?
good question. i have a hash of hashes of arrays. i want to be able, later on, to push 
more values on each secondary hash key - hence the array [''].

martin

> 
> -- 
> felix
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to