Programming Tutorials

POST to URL from Perl Script

By: Emiley J in Perl Tutorials on 2010-09-28  

This sample code in perl shows how to connect and POST data to any URL from a perl script.
use LWP::UserAgent; 
my $ua = new LWP::UserAgent;

my $response 
= $ua->post('', 
{ param1 => 'value1', 
param2 => 'value2', 

my $content = $response->content; 

Add Comment

* Required information


No comments yet. Be the first!

Most Viewed Articles (in Perl )

Latest Articles (in Perl)