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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>