If you happened to want a solution regardless of the implementation (ie Perl or not), and were ignorant of the head and tail programs, then learn to use those.my $first = `head -1 $filename`; my $second = `tail -1 $filename`;
In reply to Re: Reading Lines from Text file
by zshzn
in thread Reading Lines from Text file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |