Yeah, I had problems before with bare word issues using it as just the value that you would see in the cookbook. To me the problem seemed more apparent from the debug session, but I've been pretty intimate with the code I have been working on for the past couple days. I did not think of the string part, nor did I discern that from the documentation I read, but changing my code to the following worked well.
sub make_server
{
my ($ipv6,$conn) = @_;
print "Using protocol = $protocol, port = $socket_port.\n" if ($de
+bug);
if ($ipv6)
{
$server = IO::Socket::INET->new(Listen => $conn,
LocalAddr => "localhost:$socket_port",
Proto => $protocol,
Reuse => 1)
or die "Couldn't make IPv6 server " . $server{'LocalAddr'} ."
+ on port $socket_port: $!\n";
print "Running IPv6 enabled on $socket_port.\n" if ($debug);
}
else
{
$server = IO::Socket::INET->new(LocalAddr => "localhost:$sock
+et_port",
Proto => $protocol,
Reuse => 1,
Listen => $conn)
or die "Can't make $protocol server " . $server{'LocalAddr'}
+. " on port $socket_port: $!\n";
print "Running on $socket_port.\n" if ($debug);
}
}
Hope that helps out anyone who may encounter this in the future. | [reply] [d/l] |
| [reply] [d/l] [select] |