you are viewing a single comment's thread
view the rest of the comments
[–] 7 points 1 month ago (1 child)

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.

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)