in reply to Question about defined loop

return defined($not_exposed_reason) || 'No exposed reason';

Replies are listed 'Best First'.
Re^2: Question about defined loop
by JavaFan (Canon) on Mar 11, 2010 at 17:06 UTC
    That returns 1 if $not_exposed_reason is defined. I doubt that's what the OP wants.

      Oops, you are of course right.

      return $not_exposed_reason // 'No exposed reason';