@ISA = qw(Exporter);
@EXPORT_OK = qw(hostname hostdomain hostfqdn domainname);
-$VERSION = "2.18"; # $Id: //depot/libnet/Net/Domain.pm#20 $
+$VERSION = "2.19"; # $Id: //depot/libnet/Net/Domain.pm#21 $
my($host,$domain,$fqdn) = (undef,undef,undef);
if(defined $dom) {
my @h = ();
+ $dom =~ s/^\.+//;
while(length($dom)) {
push(@h, "$host.$dom");
- $dom =~ s/^[^.]+.//;
+ $dom =~ s/^[^.]+.+// or last;
}
unshift(@hosts,@h);
}
=for html <hr>
-I<$Id: //depot/libnet/Net/Domain.pm#20 $>
+I<$Id: //depot/libnet/Net/Domain.pm#21 $>
=cut