D:\tmp\pm>type unsafe_regex_BEGIN.pl exit; '' =~ ('(?{B'.'EGIN{die "owned"}})'); D:\tmp\pm>perl -c unsafe_regex_BEGIN.pl Eval-group not allowed at runtime, use re 'eval' in regex m/(?{BEGIN{die "owned" }})/ at unsafe_regex_BEGIN.pl line 3. D:\tmp\pm>perl -v This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread