From: ChrisH Date: 2006-03-14T00:53:44+09:00 Subject: Re: Recursive line counter (review?) I like your use of inject. However, the code you show is not recursive, but thats not really important unless it being recursive was the point... When I was playing with a similar bit of code I recall using IO.readlines('filename').size I also recall trying f=File.open('filename') f.seek(0,IO::SEEKEND) lc = f.lineno If speed is an issue oyu might want to compare various methods. Happy coding Cheers