use AI::Perlog; my $pg = AI::Perlog->new; $pg->add_fact( gives => qw/ Ovid money kudra / ); $pg->add_fact( gives => qw/ grep grief Ovid / ); # an underscore is synonymous with the empty string or undef print "y\n" if $pg->gives( qw/ _ _ kudra / ); # does anyone give anything to kudra? print "y\n" if $pg->gives( '', '', 'kudra' ); # same thing print "y\n" if $pg->gives( undef, undef, 'kudra' ); # same thing print "y\n" if $pg->gives( qw/ grep _ Ovid / ); # does grep give anything to Ovid? print "n\n" if ! $pg->gives( qw/ Ovid _ grep / ); # Returns false. Ovid gives nothing to grep