- or download this
require Net::Daemon;
package Contdmon;
use vars qw(@ISA);
@ISA = qw(Net::Daemon); # to inherit from Net::Daem
- or download this
sub new ($$;$) {
my($class, $attr, $args) = @_;
...
$self->{'logfile'} = $file;
$self;
}
- or download this
sub Run ($) {
my($self) = @_;
...
}
print "Server received request: $line\n";
}
- or download this
package main;
my $args = {
...
};
my $server = Contdmon->new ({}, $args);
$server->Bind();
- or download this
use strict;
...
# so output goes to daemon immediately
$sock->autoflush (1);
print $sock "What is the time, Mr Wolf?\n";