It is very important to note that variables are not shared between threads, all variables are per default thread local. To use shared variables one must use threads::shared. #### use threads::shared; share($returnn); #### Doesn't work at all... :( Doesn't work at all... :( Doesn't work at all... :( Run the thread! Variable should be set It works! It works! It works! ...etc