Hi Monks,
I'm a newbie to Perl (though with years of PHP experience) and am having the following problem.
I'm building a data structure to send using SOAP functions, example:
$param = SOAP::Data->name("ListOfContact" => \SOAP::Data->value( SOAP::Data->name("Contact" => \SOAP::Data->value( SOAP::Data->name("ContactId" => $contact->{ContactId}), SOAP::Data->name("ContactLastName" => $contact->{LASTNAME}), )) ));
This works as I want and expect. I'd like to add some more Data->name sections however I'd like to do this dynamically based on a database query. So in each row returned from the database I'm constructing a string variable in the foreach like:
"SOAP::Data->name("DynamicFieldName" => DynamicValue),"
I'd then like to somehow include these new lines into the SOAP param constructor, but not sure how to get it out of the string variable without it just printing the string itself. I also tried building the whole param variable into one string var and trying some sort of eval on it.
I hope that makes sense and any help would be really appreciated.
Thanks very much, Mark.
In reply to Using a dynamic variable within a SOAP data structure by firstaspect
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |