--- fping+args.monitor 2002/07/10 09:26:32 1.2 +++ fping+args.monitor 2002/07/10 10:04:48 1.3 @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w # # Return a list of hosts which not reachable via ICMP echo # @@ -62,9 +62,10 @@ # this part will strip everything after hostname foreach (@ARGV) { if (m/^[^:]+:?[^\@]*\@([^\/]+)\/?.*/) { - push @hosts,$1; + my $host = $1; + push @hosts,$host if (! grep /^$host$/,@hosts); } else { - push @hosts,$_; + push @hosts,$_ if (! grep /^$_$/,@hosts); } }