Help for this page

Select Code to Download


  1. or download this
    sub function1 {
        my ($arg1, $arg2) = @_;
        $arg1 = "" unless defined $arg1;
    }
    
  2. or download this
    sub function1 {
        my ($arg1, $arg2) = @_;
        $arg1 //= ""; # This is the new defined-or operator.
    }