package Voice2; use IO::Socket; $handle = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "localhost", PeerPort => 1314) || die($!); sub talk { print $handle "(SayText \"Testing.\")"; } 1; #### #!/usr/bin/perl use lib '.'; use Voice2; Voice2::talk; exit;