summaryrefslogtreecommitdiff
path: root/ext/IO
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-10-06 00:30:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-10-06 00:30:23 +0000
commit293f53d825022a3af3ed970f7a8f71bb230dd9d0 (patch)
tree93836f22bd294beab5978c406d3cc7ef049ef577 /ext/IO
parent276fd468aa555e31b01c2ef79370cbc782cc03cf (diff)
downloadperl-293f53d825022a3af3ed970f7a8f71bb230dd9d0.tar.gz
Retract the latter part of #12343.
p4raw-id: //depot/perl@12344
Diffstat (limited to 'ext/IO')
-rw-r--r--ext/IO/lib/IO/Socket/INET.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/IO/lib/IO/Socket/INET.pm b/ext/IO/lib/IO/Socket/INET.pm
index 7083b99fc5..051de539cf 100644
--- a/ext/IO/lib/IO/Socket/INET.pm
+++ b/ext/IO/lib/IO/Socket/INET.pm
@@ -52,8 +52,7 @@ sub _sock_info {
}
if(defined $port) {
-
- my $defport = ($port =~ s,\((\d+)\)$,,)[0];
+ my $defport = ($port =~ s,\((\d+)\)$,,) ? $1 : undef;
my $pnum = ($port =~ m,^(\d+)$,)[0];
@serv = getservbyname($port, $proto[0] || "")