I want to point out, that we should be aware of the difference in those two solutions:
The first solution will set $db to "", when the argument evaluates to FALSE.
This will happen, when the argument is undef, empty string or 0 [zero]).
So if undef and zero are wanted and valid values, the second solution should be used.
In reply to Re^2: passing a scalar to a function
by linuxer
in thread passing a scalar to a function
by nsupathy0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |