Thank God for Perl and Mladen ;)
 
Tanel.
 
----- Original Message -----
Sent: Wednesday, October 01, 2003 8:24 PM
Subject: Re: UNIX : script help/input

Mladen,
 
It worked!
 
Heartfelt thank you from the evangelized perl crowd (now watch the list-owner grin).

Mladen Gogala <[EMAIL PROTECTED]> wrote:
#!/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