hmvasista has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: socket programming
by Cow1337killr (Monk) on Jul 11, 2016 at 00:04 UTC | |
by hmvasista (Novice) on Jul 11, 2016 at 00:30 UTC | |
by syphilis (Archbishop) on Jul 11, 2016 at 00:53 UTC | |
by Cow1337killr (Monk) on Jul 11, 2016 at 01:14 UTC | |
by hmvasista (Novice) on Jul 11, 2016 at 01:49 UTC | |
by hmvasista (Novice) on Jul 11, 2016 at 01:44 UTC | |
|
Re: socket programming
by Anonymous Monk on Jul 10, 2016 at 23:29 UTC | |
by hmvasista (Novice) on Jul 11, 2016 at 00:25 UTC | |
by Anonymous Monk on Jul 11, 2016 at 00:48 UTC |