in reply to swapping PIPE for comma in CSV file

If your data is always going to have that number of fields, you can just work from the front and the back and comma-join all the bits in the middle.
perl -F, -lane'chomp;print join("|",@F[0..2], join(",",  @F[3..$#F-4]),@F[-3..-1])' A/NSRLFile.txt

Replies are listed 'Best First'.
Re^2: swapping PIPE for comma in CSV file
by dwhite20899 (Friar) on Jun 26, 2007 at 15:30 UTC
    Yeah - that's what I do now, in a VERY long-winded way. I didn't know about @F . Cool!