Hi, I am trying to "use Socket" in my code. But I am getting this error:
Can't load 'C:/strawberry/perl/site/lib/auto/Socket/Socket.dll' for module Socket: load_file:%1 is not a valid Win32 application at C:/strawberry/perl/site/lib/
XSLoader.pm line 70.
at C:/strawberry/perl/site/lib/Socket.pm line 859.
Compilation failed in require at temper.pl line 3.
BEGIN failed--compilation aborted at temper.pl line 3.
My code:
use strict;
use warnings;
use Socket;
my $protocol = getprotobyname("tcp");
print $protocol;
socket(my $socket, PF_INET, SOCK_STREAM, $protocol);
How can I fix this?