Scripsit illa aut ille ?Andreas Schwarz? <usenet.2117 / andreas-s.net>:
> Hello,
> 
> isn't it dangerous to use perl-style global variables like $1 in
> threads?

They look thread-safe

ruby -e 'Thread.new() do "Hallo" =~ /(.*)/; sleep 2; puts $1; end; Thread.new() do sleep 1; "Welt" =~ /(.*)/; sleep 2; puts $1; end; sleep 4'

This should show every thread has its own $1.