#! perl -slw use strict; use threads; use OpenGL qw[ :all ]; async{ print 'from thread' }->detach; ...