From: dblack@... Date: 2003-05-26T11:19:40+09:00 Subject: Re: why is "does" missing from this sub!-stitution? Hi -- On Mon, 26 May 2003, Dave Oshel wrote: > In article > , > dblack@superlink.net wrote: > > I'm hip to this part (see ruby-talk:70238 for proof :-) It's the \1 > > thing that I've managed to garble. I've been thinking: if $1 hasn't > > been reassigned yet, then how can \1 mean anything? But the answer, I > > now see, is: it means \1, which gets passed literally to the method, > > which *then* knows what to do with it. > > > > Ok, I sort of understand that. But the corresponding Perl syntax seems > more obvious, to my aching head. It's only distantly corresponding, though; it's not really the same syntax, just coincidence that they both happen to be dealing with substitution. > Is there a Ruby gotchas page, somewhere on the web? (I wouldn't put this example on it, but then again that wasn't your question :-) There are some "Ruby-for-Perl-programmers" resources, the most in-depth one I know of being Hal Fulton's: . If you search for "ruby for perl programmers" on Google you'll find more. David -- David Alan Black home: dblack@superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav