in reply to Re: Ternary?
in thread looking for a good idiom: return this if this is true

I guess you're missing a set of parens there:

($_ = thatroutine()) ? return $_ : undef;