From: Robert Dober Date: 2007-04-28T16:06:33+09:00 Subject: Re: Output A File w/ Line Numbers? On 4/28/07, Robert Dober wrote: > > love, > > John Joyce > > > > > ARGF.readlines.each_with_index{ > | line, idx | > puts "%3d %s" % [ idx.succ, line ] > } > HTH > Robert But Robert's solution is nicer, I did not know about ARGF.lineno, and have overlooked his solution, sorry! R -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw