in reply to Shortcut operator for $a->{'b'}=$b if $b;
You could abstract $b away into a sub (I'm assuming you're using it as a placeholder for a complex operation), and do something like:
sub b { return $b; } b() and $a->{'b'} = b();
I guess I don't really understand where your "way too verbose" is coming from; it would help if I could see a more involved example of the code you're attempting to simplify.
|
|---|