From: William James Date: 2007-04-27T18:25:05+09:00 Subject: Re: Output A File w/ Line Numbers? On Apr 27, 3:27 am, come wrote: > another way, but maybe less "ruby way" and more "perl way" : > > ruby -ne 'print "#{$.} : #{$_}"' file > > > > > ruby -ne 'BEGIN{$n=0}; print "#{$n+=1} "; print' junk I forgot about $..