in reply to Return full line from line number X

After opening the file into $file_handle
while (<$file_handle>) { next if $. < $line_number_I_want; ... do whatever you want with this line ... last; }

Replies are listed 'Best First'.
Re^2: Return full line from line number X
by CountZero (Bishop) on Oct 26, 2008 at 22:58 UTC
    But that will only work if the line numbers in the file are starting at 1, increase by 1 for each line and have no gaps.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James