http://www.perlmonks.org?node_id=886378
pseingalt has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

 

I have a very long text file with lines similar to the following throughout the text:

 

Article 1 News

Article 2 Older News

Article 3 Even Older News

Article 4 Real Old News

 

Etc.

 

Iíd like to change this so that the file reads:

 

\subsection*{Article 1 News}

\subsection*{Article 2 Older News}

\subsection*{Article 3 Even Older News}

\subsection*{Article 4 Real Old News}

 

I canít use a simple search and replace because the Article numbers change. Can Perl be used to do this?

 

Thanks in advance.