in reply to LWP Post And My Pained Brain
$sitehit in first line is not resolved. Use double quotes, instead of single ones (or in this case, simply don't use quotes).
Try to run the following and observe the _uri portion:
use Data::Dumper; use HTTP::Request; my $sitehit = "abcdefg"; my $req = new HTTP::Request POST => '$sitehit'; $req->content_type('application/x-www-form-urlencoded'); $req->content('siteurl=$incoming{\'site\'}'); print Dumper($req);
Compare with this:
use Data::Dumper; use HTTP::Request; my $sitehit = "abcdefg"; my $req = new HTTP::Request POST => "$sitehit"; $req->content_type('application/x-www-form-urlencoded'); $req->content('siteurl=$incoming{\'site\'}'); print Dumper($req);
|
|---|