in reply to Text processing question - strange output
Tried using strict? It's a good habit to aquire.
I think what you're trying to do can be done with this:
As I understand it, you want:use strict; open(NB, "nbt.csv") or die "Error reading nbt.csv: $!\n"; while(<NB>){ chomp; @nbtstat = `nbtstat -a $_`; %_=map{$_,1}map{/^\d+.\d+\.\d+\.\d+/;$&}($_,@nbtstat); print join(',',$_,keys(%_)),"\n"; }
Note: this'll print the original IP address twice.
--
Brother Frankus.
¤
|
|---|