--- Miko O'Sullivan <[EMAIL PROTECTED]> wrote: > SUMMARY > > C<$var ?= $x : $y> as a shortcut for C<$var = $var ? $x : $y>. > > > DETAILS > > We have ||=, +=, -=, etc. These shortcuts (I'm sure there's some fancy > linguistic term for them) save us a few keystrokes and clean up the code. > > So, concerning C<? :>, I find myself doing this type of thing a lot: > > $var = $var ? 1 : 0; > > How 'bout a shortcut for that, something like this: > > $var ?= 1 : 0; > > > -miko > > > > Miko O'Sullivan > Programmer Analyst > Rescue Mission of Roanoke >
Good idea, but ? and : were renamed to ?? and :: in perl6, so it should be ??= __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com