Skip to content

Commit

Permalink
make it possible to test if hostnames are valid or not using this script
Browse files Browse the repository at this point in the history
git-svn-id: svn://anonsvn.it.su.se/svn/HOSTDB/trunk@613 36f62460-150b-0410-929b-89381cca7e77
  • Loading branch information
Fredrik Thulin committed Nov 3, 2004
1 parent 0cc0f06 commit cf7cd46
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/hostbyname
Expand Up @@ -28,6 +28,11 @@ my $first = 1;
my $match_count = 0;

foreach my $t_search (sort @searchfor) {
if (! $hostdb->clean_hostname ($t_search)) {
warn ("'$t_search' is not a valid hostname\n");
next;
}

my @hostlist = $hostdb->findhostbyname ($t_search);
if ($#hostlist == -1) {
warn ("No entrys matching '$t_search'\n");
Expand Down

0 comments on commit cf7cd46

Please sign in to comment.