http://qs321.pair.com?node_id=11109814


in reply to Re^3: RFC: "assignary" operator ?= :
in thread RFC: "assignary" operator ?= :

Yes with a properly named custom-function operating on an alias.
init $var1 => 'value1'; # pretty elegant, right?

No, not at all. First, init() is a poor name which doesn't, by name, tell at all what it is doing. Second, the sub you wrote isn't at all ternary in any way, since it misses $_[2]. Third and last, function LIST doesn't tell at first glance that it is about conditional assignment to $_[0] from either $_[1] or $_[2] based on defined-ness of $_[0].

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'