From: Jos Backus Date: 2005-02-10T07:01:07+09:00 Subject: Re: How to mimic Perl's `s///' in Ruby? On Thu, Feb 10, 2005 at 05:52:34AM +0900, Glenn Parker wrote: > The Pickaxe doc for String#sub states the MatchData $-variables will be > available using the block form of String#sub!, but it doesn't bother to > remind you that they are available in the non-block form as well. Duh, for some reason I didn't realize that $1 etc. are available _outside_ the block in the first place as they are global. Thanks for all your responses people, enlightening as always. -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'