http://www.perlmonks.org?node_id=587239


in reply to ?: = Obfuscation?

I only use it in places where it's impossible to use an if/else without breaking things up too much. For example, in a hash assignment:
%hash = ( a => 1, b => ($c ? 'yes' : 'no'), );

Replies are listed 'Best First'.
Re^2: ?: = Obfuscation?
by qbxk (Friar) on Dec 06, 2006 at 17:56 UTC
    only use it in places where it's impossible to use an if/else without breaking things up too much. For example, in a hash assignment:
    %hash = ( a => 1, b => ($c ? 'yes' : 'no'), );
    seconded

    It's not what you look like, when you're doin' what you’re doin'.
    It's what you’re doin' when you’re doin' what you look like you’re doin'!
         - Charles Wright & the Watts 103rd Street Rhythm Band, Express yourself