Here it is, edit to taste. I made a bunch of assumptions about the
validity of the input data and let the files be in the current
directory...


open (O, "<Old_File.txt") or die;
open (N, ">New_File.txt") or die;

while (<O>) {
($A, $B, $C, $D, $E, $F, $G, $H, $I, $J, $extras) = split /,/, $_,
11;
die "whoops, too many fields" if $extras;
print N "$A,$B,$C,$D,$I,$J";
print N "$A,$B,$E,$F,$I,$J";
print N "$A,$B,$G,$H,$I,$J";
}

edit: hey, what happened to my formatting!

Steve.


-- 
SteveEast
------------------------------------------------------------------------
SteveEast's Profile: http://forums.slimdevices.com/member.php?userid=4193
View this thread: http://forums.slimdevices.com/showthread.php?t=23777

_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to