Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How to chomp the last new line character from the file

by jmcnamara (Monsignor)
on Nov 24, 2011 at 11:33 UTC ( #939855=note: print w/ replies, xml ) Need Help??


in reply to How to chomp the last new line character from the file

Here is one way:

perl -i -pe 'chomp if eof' file1 file2 ...

--
John.


Comment on Re: How to chomp the last new line character from the file
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939855]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-08-02 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (53 votes), past polls