in reply to Reading Lines from Text file
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`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading Lines from Text file
by graff (Chancellor) on Feb 03, 2006 at 02:50 UTC | |
|
Re^2: Reading Lines from Text file
by holli (Abbot) on Feb 02, 2006 at 19:44 UTC | |
by malduarte (Initiate) on Feb 02, 2006 at 23:00 UTC |