Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Printing first and last line

by Old_Gray_Bear (Bishop)
on Aug 14, 2012 at 00:46 UTC ( #987243=note: print w/replies, xml ) Need Help??


in reply to Printing first and last line

$ head -1 Sample_01.txt $ tail -1 Sample_01.txt
Sometimes the answer is to use the shell commands rather than try to recreate them in Perl. See Low Fat Linux for an example.

Update: Added link to head/tail documentation.

----
I Go Back to Sleep, Now.

OGB

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987243]
help
Chatterbox?
[Discipulus]: hello there: Lady_Aleena for inspiration random browse my homenode.. ;=)
[Lady_Aleena]: Discipulus, Hello there. How are you?
[Lady_Aleena]: Good GUH Discipulus! Do you have enough links there?

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-09-24 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (274 votes). Check out past polls.

    Notices?