The stupid question is the question not asked | |
PerlMonks |
Re: RFC: "assignary" operator ?= :by kcott (Archbishop) |
on Dec 09, 2019 at 05:53 UTC ( [id://11109867]=note: print w/replies, xml ) | Need Help?? |
G'day richard.sharpe, $var ?= "something" : "something else"; I suspect something along these lines would do what you want using existing syntax:
Some examples:
From "Re^2: RFC: "assignary" operator ?= :": $var1 ?= die "ERROR: \$var1 already set." : $var2; You could do something rather exotic like:
But ask yourself:
— Ken
In Section
Meditations
|
|