When I change to :
...
elsif ($line =~ /^\s+?client-hostname\s+"([a-z0-9\-\.]+)"/i) {
...
I found IP:10.10.97.207
I found Hostname:
I found IP:10.10.97.207
I found Hostname: HOST1
Seems you have some space there. Also, you probably want to move
your my $hostname and my $ip statements. If a hostname line wasn't
found, it would show up as the previously defined hostname (same with
IP)!
Anyway, that should help, it DOES find it - this should help you
solve the problem.
Ryan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>