in reply to Re: passing a scalar to a function
in thread passing a scalar to a function
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.
|
|---|