Useful habit: when you type
sub mycheck {
go on and type
my () = @_;right away. In the present case you would fill in the list of receiving variables with $db:
my ($db) = @_;Since you want the default value to be the null string, you can go on and say
$db ||= "";In reply to Re: passing a scalar to a function
by Narveson
in thread passing a scalar to a function
by nsupathy0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |