in reply to Re: Need help constructing a one-liner
in thread Need help constructing a one-liner

You know, you can do this too:

perl -F, -lapi.bak -e'$_=join(",",@F[0..3,3,4,4..$#F])' data.txt

Not that we're golfing or anything :-)

Oh, and you forgot your assignment to $_. Otherwise it won't print what you want