SyntaxFix
Write A Post
Hire A Developer
Questions
perl -pi.bak -e 'unless(eof){s/\n/,/g}' your_file
This will create a backup of original file with an extension of .bak and then modifies the original file