in reply to Re: ithreads not behaving as expected
in thread ithreads not behaving as expected

Then you will have to supply more information because what you've shown so far works as expected:

#! perl -sw use 5.010; use strict; our $FLAG; if( $FLAG ) { require '780835-s.pl'; doit(); }
#! perl -sw use 5.010; use strict; use threads; sub t{ say 'Hi from thread'; } sub doit { say 'Before'; my $t = threads->create( \&t ); say 'After'; } 1;
C:\test>780835-m -FLAG=0 C:\test>780835-m -FLAG=1 Before After Hi from thread Perl exited with active threads: 1 running and unjoined 0 finished and unjoined 0 running and detached

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW