I have somehow never needed a BEGIN block (or any of perl's named blocks) before, so it never would have occurred to me to even search there
In case it further helps your general understanding of BEGIN blocks in Perl, I've listed a few more references below:
Note that a use Module qw/a b c/; statement is equivalent to:
BEGIN { require Module; Module->import(qw/a b c/); }
while sub name {...} is equivalent to:
BEGIN { *name = sub {...}; }
update: but see response by ikegami for how to name the BEGIN block anon sub (useful in traces).
PM References Added Later
👁️🍾👍🦟
In reply to Re^2: create an anonymous hash using "map" (BEGIN block References)
by eyepopslikeamosquito
in thread create an anonymous hash using "map"
by raygun
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |