I wanted to remove the new line character at the end of each line

See chomp.

But does a Word document contain anything that Perl would recognise as a newline character? I don't know anything about that file format.

--

See the Copyright notice on my home node.

Perl training courses


In reply to Re^3: find acronyms in a text by davorg
in thread find acronyms in a text by steph_bow

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":