in reply to Pass an optional parameter to a subroutine
means: give me the parameter and if it is false (and '0' is false), then set it to 1.my $db_write = shift || 1;
#!/usr/bin/perl use strict; use warnings; #===================================================================== sub handleVoicemailNote { #===================================================================== my ($ref_mail,$db_write) = @_; $db_write = 1 unless defined($db_write);
|
|---|