#!/usr/bin/perl -w
use strict;
use bytes;
my ($NAME,$IP,@LB);
while (<>) {
chomp;
@LB=split /\s+/;
if ($LB[0] =~ /^name:/i) {
   $NAME=$LB[1];
   }
if ($LB[0] =~ /^address:/i) {
   $IP=$LB[1];
   write;
   }
}
format STDOUT=
@<<<<<<<<<<<<<<<<<< ,@<<<<<<<<<<<<
$NAME,$IP

Reply via email to