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
In reply to Re: Printing first and last line
by Old_Gray_Bear
in thread Printing first and last line
by maheshkumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |