Kevin, thanks for your help, I am definately getting closer to the answer. I apprishiate your patience with me.
Here is the raw data:
agriggs,10.160.4.148,tcmcpccma1,agriggs
tthomas,10.160.7.14,tcmcpccma1,tthomas
sturman,10.160.4.186,tcmcpccma1,sturman
Here is the expected result:
agriggs,10.160.4.148
tthomas,10.160.7.14
sturman,10.160.4.186
Here is my code:
open (IN, 'P:\CCMAAudit\tmp00.txt');
open (OUT,'>P:\CCMAAudit\tmp01.txt');
while (<IN>) {
chomp;
s/^[^,]+,[^,]+,(.*)/$1/;
print OUT $_, "\n";
}
close (IN); close (OUT);
Here is the actual result:
tcmcpccma1,agriggs
tcmcpccma1,tthomas
tcmcpccma1,sturman
I'm getting the exact opposite of what I'm after. I'm close to understanding this, but I just haven't wrapped my head around it yet.