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-&
my $err = join(' ', $soap_response->code, $soap_response->string) . "\n";
or, better IMO:
return sprintf "%s %s\n", $soap_response->code, $soap_response->string;
See perldoc -f join and perldoc -f sprintf perldoc perlop.
Regarding the warning, see perldoc perlop and this note on the comma operator.