• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: August 24th, 2025

help-circle





  • aMockTie@piefed.worldtomemes@lemmy.world•Expressions
    link
    fedilink
    English
    arrow-up
    8
    ·
    8 days ago

    Why waste time doing any matching if wantarray == false? Just do:

    if(!wantarray) { return 1; }

    Before any matching happens, or if you only want one return statement set the value of a variable in if(!wantarray)/elsif(regex) and return that variable at the end.