in reply to Search pattern not terminated at warnings.pm line 508.

I got a "permission denied" from the shell, when executing your "exec 'env'..." line. Changing that line to:
exec '/usr/bin/env',"MYCODEFILE=$0",@ARGV;
allows the line to execute, and shows the environment variables.

        What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
              -Larry Wall, 1992