From: Robert Date: 2004-07-10T19:37:29+09:00 Subject: Re: Regexp exercise Olivier D. wrote: > I think that the best way to do it would be to use a simple match > operator like: > value = $1 if string =~ /b: (\d+)/ > > But on a different thread (http://tinyurl.com/38b27) someone explained > that using global variables was a bad habit not to take. I'm not 100% but as far as I remember $1 is thread local, i.e. no two threads can interfere with each other if they match regular expressions at the same time. In that case it would be save to use $1. Can anybod comment on that? Kind regards robert