ashokpj has asked for the wisdom of the Perl Monks concerning the following question:
In my file there are multiple new line char at EOF. I want to remove only new line char at end of file.
Line 1….\n Line2….\n \n Line3 …\n Line4….\n \n \n
Expected output
Line 1….\n Line2….\n \n Line3 …\n Line4….\n
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to remove newline characters at the end of file
by GrandFather (Saint) on Feb 21, 2012 at 09:55 UTC | |
|
Re: How to remove newline characters at the end of file
by Eliya (Vicar) on Feb 21, 2012 at 11:01 UTC | |
|
Re: How to remove newline characters at the end of file
by moritz (Cardinal) on Feb 21, 2012 at 09:47 UTC | |
|
Re: How to remove newline characters at the end of file
by trizen (Hermit) on Feb 21, 2012 at 13:15 UTC | |
|
Re: How to remove newline characters at the end of file
by JavaFan (Canon) on Feb 21, 2012 at 10:08 UTC | |
by Mandrake (Chaplain) on Feb 21, 2012 at 23:00 UTC | |
|
Re: How to remove newline characters at the end of file
by planetscape (Chancellor) on Feb 22, 2012 at 00:47 UTC | |
|
Re: How to remove newline characters at the end of file
by Mandrake (Chaplain) on Feb 21, 2012 at 23:29 UTC |