Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

usefull expression for initializing something

11 views
Skip to first unread message

Rainer Weikusat

unread,
Nov 4, 2020, 2:20:29 PM11/4/20
to
\%by_addr = $$self[BY_ADDR] //= {};

This will (with refaliasing enabled) cause %by_addr to refer to the
anonymous hash stored in $$self[BY_ADDR]. If $$self[BY_ADDR] is
undefined, it'll first create an anonymous hash and assign a reference
to that to $$self[BY_ADDR].
0 new messages