From: Diego Suarez Date: 2007-09-07T18:00:58+09:00 Subject: Re: read a specific line from a file ------=_Part_55456_8352938.1189155657089 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline If you want something quick and you're not going to reuse it in a bigger program (bad, bad, use methods anyway! xD), you also can do it in one line, such line_three =3D File.readlines(the_file)[2] # File.readlines returns an arra= y containing all the lines of a file. Get the third element and you're done. On 9/7/07, Pe=F1a, Botp wrote: > > From: Bulhac Mihai [mailto:mihai.bulhac@yahoo.com] > # how can i read only a line from a txt file? > # for example i want to read only line 3 > ------=_Part_55456_8352938.1189155657089--