Either || works for both undef and the empty string, or it works for neither. In this case, it works for both.
TMTOWTDI means you have the freedom to choose the best way in a given situation. It doesn't mean it's a good idea to arbitrarily pick a way of doing something, contrary to the meaning you gave it. Returning undef results in a much better failure mode (gives an error with a meaningful message instead of a misleading warning) if the user forgets to do error checking, so returning undef is better than returning an empty string in this situation.
In reply to Re^3: Uninitialized filehandles not as advertised?!
by ikegami
in thread Uninitialized filehandles not as advertised?!
by Eli-Sko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |