i'm getting errors when trying to print these hash refs out and i just can't
figure it out. here's the function:

for my $word ( keys %data ) {
   while( my ($field, $type) = each %{ $data }{ $word } ) {
      print "$word,$field" if( $type eq 'field' );
      while( my ($line, $type) = each %{ $data }{ $word } ) {
         print ",$line" if( $type eq 'line' );
      }
   }
}


and this is what i'm seeing:

Global symbol "$data" requires explicit package name at ./namevsfield.plline 70.
syntax error at ./namevsfield.pl line 70, near "}{ "
Global symbol "$type" requires explicit package name at ./namevsfield.plline 71.
Global symbol "$data" requires explicit package name at ./namevsfield.plline 72.
syntax error at ./namevsfield.pl line 72, near "}{ "
Global symbol "$word" requires explicit package name at ./namevsfield.plline 72.
Global symbol "$type" requires explicit package name at ./namevsfield.plline 73.


any ideas? i'll post the whole thing if anyone is interested (for starts on
line 69).
thanks

Reply via email to