Jerome Abela writes:
>
> In sub connect of Sys::Syslog, someone wrote:
> ($host) = $host_uniq =~ /(\w+)/;
>
> But, if the name contains a '-', it gets truncated. The RE should
> rather be someting like [a-zA-Z0-9-]+, shouldn't it ?
p5p-msgid:
199704151421.RAA19693@alpha.hut.fi
unless ($host) {
require Sys::Hostname;
my($host_uniq) = Sys::Hostname::hostname();
- ($host) = $host_uniq =~ /(\w+)/;
+ ($host) = $host_uniq =~ /([\w\-]+)/;
}
my $udp = getprotobyname('udp');
my $syslog = getservbyname('syslog','udp');