in reply to Printing first and last line
Sometimes the answer is to use the shell commands rather than try to recreate them in Perl. See Low Fat Linux for an example.$ head -1 Sample_01.txt $ tail -1 Sample_01.txt
Update: Added link to head/tail documentation.
----
I Go Back to Sleep, Now.
OGB
|
|---|