From: "Peña, Botp" Date: 2007-09-08T19:51:04+09:00 Subject: Re: read a specific line from a file From: William James [mailto:w_a_x_man@yahoo.com] # > rio has simple solutions for line grabbing, like eg, "get # line 3..5, lines 100,200,300..400, and lines containing /test/" # > # > rio('test.txt').line[3..5,100,200,300..400,/test/] # # lines = IO.readlines("phrases_no_extra.txt") # lines.values_at( 3..5,100,200,300..400 ) + # lines.grep( /test/ ) yap. very clean too, but, 1. reads whole file in mem 2. rescans array 2x kind regards -botp