#======= Encode XML base64 ================================ use MIME::Base64 ; $enco = encode_base64($wr); #======= Send request to Payment Gateway ================== use HTTP::Request::Common qw(POST); use LWP::UserAgent; $ua = LWP::UserAgent->new(); my $req = POST 'https://payment.server.com/payment/Interface'; [ type=>'hidden', name=> 'TradeInfo', value=> $enco, type=>'submit', value=>'submit', ]; $content = $ua->request($req)->as_string; # print "Content-type: text/html\n\n"; print $content;