How can I resolve this case of “Useless use of a variable in a void context”?

前端 未结 3 1729
一整个雨季
一整个雨季 2021-02-19 00:17

How can I resolve this case of \"Useless use of a variable in a void context\"?

For example:

  my $err = $soap_response->code, \" \", $soap_response-&         


        
3条回答
  •  爱一瞬间的悲伤
    2021-02-19 00:46

    I guess you wanted to concatenate the string pieces to form the entire error message, so you'll have to use the dot instead of comma:

    my $err = $soap_response->code. " ". $soap_response->string. "\n";
    

提交回复
热议问题