print "start main running here\n"; eval "BEGIN{print qq(BEGIN: before eval compilation at run-time\n)} END{print qq(END: from eval STRING\n)}"; eval {BEGIN{print qq(BEGIN: before eval compilation at compile-time\n)} END{print qq(END: from eval BLOCK\n)}}; END { print "END: done running\n" } BEGIN { print "BEGIN: still compiling\n" }