/usr/share/doc/boolstuff-dev/examples/test-booldnf.pl is in boolstuff-dev 0.1.15-1ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/usr/bin/perl -w
#
# $Id: test-booldnf.pl,v 1.3 2005/02/03 23:26:43 sarrazip Exp $
#
# Example of bidirectional pipes to talk to the booldnf(1) command
# from a Perl script.
#
# Written by Pierre Sarrazin <http://sarrazip.com/>
# This file is in the public domain.
#
use strict;
use IPC::Open2;
my $command = shift || "booldnf";
my ($reader, $writer);
my $pid = open2($reader, $writer, $command);
if (!defined $pid)
{
print "open2: $command: $!\n";
exit 1;
}
while (<>)
{
print $writer $_;
my $response = <$reader>;
print "Response: $response";
}
close $reader;
close $writer;
waitpid $pid, 0; # see the IPC::Open2 manual page.
|