in reply to Re: create an anonymous hash using "map"
in thread create an anonymous hash using "map"
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
👁️🍾👍🦟
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: create an anonymous hash using "map" (BEGIN block References)
by perlfan (Parson) on Aug 24, 2024 at 17:58 UTC | |
by LanX (Saint) on Apr 29, 2025 at 21:17 UTC | |
Re^3: create an anonymous hash using "map" (BEGIN block References)
by ikegami (Patriarch) on Apr 29, 2025 at 22:14 UTC |