package Voice;
use IO::Socket;
sub new {
shift;
my $self = {};
bless($self);
return $self;
} # end-new
sub talk {
$handle = IO::Socket::INET->new(Proto => "tcp",
PeerAdr => "localhost",
PeerPort => 1314)
|| die($!);
print $handle "(SayText \"Testing.\")" || die($!);
} # end-talk
1;
####
#!/usr/bin/perl
use CGI qw(:header);
print header;
use Voice;
my $voice = new Voice;
$voice->talk;
exit;
####
#!/usr/bin/perl
use IO::Socket;
$handle = IO::Socket::INET->new(Proto => "tcp",
PeerAddr => "localhost",
PeerPort => 1314)
|| die($!);
print $handle "(SayText \"Testing.\")";
exit;