From: Nicholas Van Weerdenburg Date: 2005-01-22T06:41:59+09:00 Subject: Re: Getting the version number of the ruby interpreter That's no longer supported as of 1.8, but unfortunately gives no error, according to page 64 of PickAxe2. while line = gets puts line if line =~ /start/ .. line =~ /end/ end is the correct form now. Note: gets and print still operate magically on $_ in 1.8.2 but I'm guessing / / doesn't, and hence that example no longer working. More in line with the original example, I'd guess that this also works: while gets print if $_ =~ /start/ .. $_ =~ /end/ end # $_ implicit for gets and print Regards, Nick -- Nicholas Van Weerdenburg On Sat, 22 Jan 2005 06:10:58 +0900, William James wrote: > > Trevor Wennblom wrote: > > > > http://www.zenspider.com/Languages/Ruby/QuickRef.html > > > That site has this: > > # prints lines starting at 'start' and ending at 'end' > while gets > print if /start/../end/ > end > > Is that correct? > >