#!/usr/bin/perl use strict; use warnings; use AI::Prolog; my $prolog = AI::Prolog->new(<query('father(Whom)'); while (my $results = $prolog->results) { print "@$results\n"; } __END__ father bill father tom