Hi,
I have a simple question:
I need to enter some text in a text file at a certain place via perl.
I would first need to find that specific text in the file and then I would like to insert a line after that particular line.
Say I have this text file:
I am a great Perl Programmer
I would like to learn Perl
Now I would like to insert a line called: "My Name is Som" between the two lines.
So I would need a regex to search the line: "I am a great Perl Programmer" and then insert "My Name is Som" in the next line.
What should be the command in perl? I know this is a dumb question.
Can anyone help?
Thanks