in reply to Read from a file one line at a time?
Have a look at the File & I/O section of perlintro.
perl comes with lots of documentation :)