[tpm] Stupid question time!
Shaun Fryer
sfryer at sourcery.ca
Fri Jan 29 16:40:00 PST 2010
I often find myself doing things like this...
my $bar = $foo if $foo;
...and I wish there were an assignment operator conditional on right-hand
truthiness. maybe...
my $bar ?= $foo; # as opposed to $bar ||= $foo;
Thoughts? Have I overlooked an existing operator? Is this just a bad idea?
--
Shaun Fryer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20100129/254eb479/attachment.html>
More information about the toronto-pm
mailing list