sub satisfied { my ($self, @body) = @_; if ($debug) { warn sprintf "TESTING @body in satisfied() with self-e: %s", Data::Dumper::Dumper($self->{established}); } for my $prop (@body) { if ($debug) { warn sprintf "prop($prop): %s dr: %s dr2: %s dump: %s", $prop, $self->{established}->{$prop}, $self->{established}->{intro_rec}, Data::Dumper::Dumper($self->{established}); } #### TESTING intro_rec comp_org adv_prog theory in satisfied() with self-e: $VAR1 = \ { 'adv_prog' => '1', 'intro_cs' => '1', 'theory' => '1', 'comp_org' => '1', 'intro_req' => '1' }; Use of uninitialized value in sprintf at blib/lib/AI/Proplog.pm line 70. Use of uninitialized value in sprintf at blib/lib/AI/Proplog.pm line 70. prop(intro_rec): intro_rec dr: dr2: dump: $VAR1 = { 'adv_prog' => '1', 'intro_cs' => '1', 'theory' => '1', 'comp_org' => '1', 'intro_req' => '1' }; #### package X; use strict; sub printlist { my ($self, @L) = @_; for my $prop (@L) { if ($self->{established}->{$prop}) { warn "$prop established"; } else { warn "$prop NOT established"; } } } my $self = {} ; bless $self, 'X'; my @L = qw(intro_cs comp_org adv_prog theory); my @M = qw(intro_req); $self->{established}->{$_}++ for @L; $self->printlist(@L); $self->{established}->{$_}++ for @M; $self->printlist(@M);