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



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

Answer / Sunny Mehrotra

"You can use the 'tr' operator to replace all tab characters (t) with commas (,). For example: tr/t/,/ < filename >n"n"will read from the file named 'filename', replace every tab character with a comma and write the result back to the same file."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CGI Perl Interview Questions

What is it meants by '$_'?

1 Answers  


Explain the difference between "my" and "local" variable scope declarations. ?

1 Answers   HCL,


What are the various advantages and disadvantages of perl?

1 Answers  


What does this symbol mean '->'?

1 Answers  


What are the logical operators used for small scale operations?

1 Answers  


What is the difference between $array[1] and @array[1]?

1 Answers  


How do I pass a command line argument in perl?

1 Answers  


What is the easiest way to download the contents of a URL with Perl?

1 Answers  


Explain lists and ivalue?

1 Answers  


Which functions in perl allows you to include a module file. State their differences.

1 Answers  


How do find the length of an array?

0 Answers  


What is the difference between die and exit in perl?

1 Answers   HCL,


Categories