Generating C code from perl script which use Socket

N

noone

Hello,

I am trying to translate in C the simple following perl script:

use Socket;

my $proto = getprotobyname('tcp');
socket(SERVER, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";

For that, I use the command:

perl -MO=C test.pl > test.c

But I obtain the following (error) messages:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,369
Latest member
FTMZ

Latest Threads

Top