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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939855]
help
Chatterbox?
[LanX]: don't go to Great Brexitan ... :)
[erix]: So it's this Babis character that has won?
[erix]: that doesn't sound good...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-10-21 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (270 votes). Check out past polls.

    Notices?