in reply to Need help constructing a one-liner

What you have now would work as a one liner, assuming you are going for perl -e. If you are playing golf, I'd suspect trying somethign like..

$_=~s/^(([^,]+,){4})([^,]+,[^,]+)/$1"$3"/;

would work too. Nothing is wrong with what you have though. I think it's much clearer.


Play that funky music white boy..