#!/usr/bin/perl -w
#
#NAME
#  ____ -
#
#SYNOPSIS
#  ____ [file]..
#
#DESCRIPTION
#
#OPTIONS
#
#EXAMPLES
#
#FILES
#
#BUGS
#
#SEE ALSO
#
#AUTHOR
#  John Chambers <jc@trillian.mit.edu>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #

$| = 1;
($P = $0) =~ s".*/"";	# Our name, minus directories
$V = $ENV{"V_$P"} || 1;	# Verbose/trace/debug level
$exitstat = 0;			# Set to nonzero for failure

@srvrs = `ls http`;
for $srvr (@srvrs) {
	$srvr =~ s/[\r\s]+$//;
	if (($host,$port) = ($srvr =~ /^(.+):(\d+)$/)) {
		print STDERR "$: host='$host' port=$port [explicit]\n" if $V>1;
	} else {
		$host = $srvr;
		$port = 80;
		print STDERR "$: host='$host' port=$port [default]\n" if $V>1;
	}
	($ipad = `ipad $host`) =~ s/[\r\s]+$//;
	print STDERR "$: host='$host' ipad=$ipad\n" if $V>1;
	print "$ipad	$host\n";
} 



exit $exitstat;

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
