in reply to Can / Do BEGIN blocks return their evaluated content?

BEGIN blocks are compiled and executed during the compilation of the program text in which they appear. Since the containing program text is just compiled, an assignment of a BEGIN block's return value cannot take place: that would be runtime. That's why use (compile time) doesn't return anything, while require (runtime) does.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re: Can / Do BEGIN blocks return their evaluated content?