After much fiddling, I am just down to how to do post an array @data, to the URL? It only posts the first line in the array.
I have an array @data that holds a bunch of XML data. I am trying to send it all to port 8180 on the localhost to another application, but it is only sending the first line. What is the best way to send the entire array as is? A foreach loop would open a new connection each time instead of sending it all as one stream, correct? Cause when I do it like this, it only posts the opening tag.
my $browser = LWP::UserAgent->new;
...
...
...
open(FILE,"output.xml");
my @data = <FILE>;
my $response = $browser->post( $url, Content => @data );