in reply to Potential Ternary Operator Bug

I agree with merlyn, having found that error deep in the bowels of sv.c. That's the bit of Perl that handles all things scalar. It's all in the sv_setsv_flags function, which copies one scalar to another. If the source scalar is actually a pointer to an array, hash, sub, or filehandle and if there's an opcode attached (that is, if PL_op exists), it'll throw this message.

If you deparse it with B::Terse, you'll find that the second op under the assign opcode is rv2av, dereferencing an array reference. Next up are a couple of leave/enter block opcodes. That's where the 'in leave' comes from. Looks like this prevents a core dump. Weird.

Anything else, you'll have to find someone who knows better than I.