Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Printing first and last line

by pvaldes (Chaplain)
on Aug 14, 2012 at 08:27 UTC ( #987294=note: print w/replies, xml ) Need Help??


in reply to Printing first and last line

perl -ne 'print if eof || $. == 1' my_file

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987294]
help
Chatterbox?
[Corion]: stevieb: Naah, I wouldn't delete versions from CPAN. Just up the version to 2.37 resp. 2.37.0 / 2.37.1 etc

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (15)
As of 2017-01-19 15:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.