Hello world/Web server: Difference between revisions

Perl: simplify IO::Socket::INET call by using LocalAddr and remove Proto ("tcp" is default anyway)
(removed the last change --- it failed to listen to :8080 (it did a listen to :5000))
(Perl: simplify IO::Socket::INET call by using LocalAddr and remove Proto ("tcp" is default anyway))
Line 668:
<lang Perl>use IO::Socket::INET;
 
my $sock = new IO::Socket::INET ( LocalHostLocalAddr => "127.0.0.1:8080",
LocalPort => "8080",
Proto => "tcp",
Listen => 1,
Reuse => 1, ) or die "Could not create socket: $!";
Anonymous user