Login
You're viewing the techdon.dev public feed.
  • Jun 25, 2025, 9:10 AM

    There's the "logician's if" in #perl where you do something like
    ```
    $cond or return blah
    ```
    instead of
    ```
    if ($cond) { return blah }
    ```
    And blah could be for example a call to a logging function or whatever.

    Now, what if I wanted the equivalent of
    ```
    if ($cond) { blah; return }
    ```
    instead? Any good, *readable* shorthand to augment the blah() call with to ensure I return blank instead of blah's return value? Couldn't find anything fun in perlsecret and I'm completely blanking on ideas.

    💬 0🔄 0⭐ 0