Re: problems parsing a DHCP.leases file.



Hi,
here is wrong:

elsif ($line =~ /^client-hostname/) {

$hostname = $1; }

for the line like that:

client-hostname "HOST1";

I think maybe you should do:

elsif ($line =~ /^\s*client-hostname\s+\"(.*?)\"){
$hostname = $1;}


HTH.

--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com
.