http://www.perlmonks.org?node_id=898314


in reply to Replace characters of input stream on the fly

Write a program that opens a file, or dies if it can't be opened.

Modify the program to read one line, and display that line.

Modify that program to read each line in the file.

Modify that program to open a second, CSV file for output (dying if you can't).

Modify that program to output each read line to the CSV file.

Modify that program to change the record terminator.

Let us know at what point you have a problem. Show us your code and the error produced.

Otherwise, tell your teacher / boss you're too lazy to do the job yourself...