http://www.perlmonks.org?node_id=1016416


in reply to URI::Escape::escape_char error when posting to a form inside perl script

In my all night (again) of searching I finally found a workaround that solved my issue since the host admin was of no help. In case, this comes up in the future for anyone..

Thank you monks for your help. I was literally lost for days and dreaming about this crap.

use strict; use LWP::UserAgent; use HTTP::Request::Common; my $data1 = "$something"; my $data2 = "someone@email.com; my $data3 = "something"; my $prepstring = "data1=$data1\&data2=$data2\&data3=$data3"; my $ua = LWP::UserAgent->new(); my $response = $ua->post("$URLtoPostTo", Content => $preppedstring ); # This allows reserved characters such as @$ to pass through URI:Escap +e without issue I guess.