Tim Hammerquist <tim / vegeta.ath.cx> writes:

> Yes, he's talking about Perl. However, Ruby's behavior mimics
> Perl's, at least insofar as "nothing changes if nothing matches".

Actually, Ruby unsets $1 on failure:

     irbsh(main):005:0> /(a)/ =~ "cat"
     1
     irbsh(main):006:0> $1
     "a"
     irbsh(main):007:0> /(a)/ =~ "dog"
     nil
     irbsh(main):008:0> $1
     nil


I guess this means Merlyn would be happier with Ruby!


Cheers


Dave