in reply to Just a quickie about FH:s
If I understand your question, you want to read/display a particular
line in a file. There is a recipie (8.8) for this in the Perl Cookbook
If your file isn't too large, read it into an array:($filename, $line) = @ARGV; open (IN, "$filename" ) or die "can't open $filename: $!\n"; while (<IN>) { $input = $_; last if $. == $line; } if ($. != $line) { die "didn't find line: $line in $filename\n"; } print $input;
@lines = <FILE>; $desired_line = $lines[$LINE_NUMBER];
In Section
Seekers of Perl Wisdom