I am sorry that I cannot offer more help with the information you have provided. It is not clear if the text "Column A" is part of your input file or if it is annotation for your post. Is the text an actual dump of the input file or is it one column from a multi-column file? Your example does not include a single record that does not require the new text. I cannot tell what separates columns. It appears to be whitespace, but then your output would have three columns rather than two (A and B). If the column separator is a TAB, I recommend that you change it to a (:) or some other printable character (at least in your post).

You indicate that you want a perl program that does the same thing as an existing AWK program. It would be a big help if you show us the AWK code.

I look forward to seeing your clarifications.

Perl has several command-line switches which make it act much like AWK. I recommend that you avoid these until you learn to solve the problem with more normal perl. You ask where to start. Begin EVERY perl program with the commands

Code

use strict; use warnings;

This will require you to declare every variable with 'my'. That is a small price to pay for the debug time you will save. Open your input file for input and your output file for output. (Use the three argument form of open).

Code

open my $input_handle, '<', input.csv;

Use a while loop to read through the input file. Modify each record and print it to the output file inside the loop. When the loop ends, close both files. Good Luck, Bill