From: Rudolf Polzer Date: 2003-09-02T23:52:16+09:00 Subject: Re: Are perl-style global variables thread-safe? Scripsit illa aut ille �Andreas Schwarz� : > 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.