406
Expressions
(lemmy.nz)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
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.
That Perl. You never know if
returndoesn't have some kind of hidden behavior that uses the local variables...Well, you could read the perldoc page on it. But you can't just assume it.