Perl Programming Question:
Download Questions PDF

How do I replace every <TAB> character in a file with a comma?

Answers:

Answer #1
perl -pi.bak -e 's/t/,/g' myfile.txt

Answer #2
regex is wrong it should be s/\\\\t/,/g

Download Perl Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How do I do < fill-in-the-blank > for each element in an array?What is the easiest way to download the contents of a URL with Perl?