POST to URL from Perl Script

By: Emiley J Emailed: 1730 times Printed: 2344 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

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('https://www.samples.com/submit.cgi', 
{ param1 => 'value1', 
param2 => 'value2', 
});

my $content = $response->content; 
#---------

Perl Home | All Perl Tutorials | Latest Perl Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Emiley J
Password must include both numeric and alphabetic characters - Magento
What is Hadoop?
Returning multiple values from a web service
Tomcat and httpd configured in port 8080 and 80
Java Webservices using Netbeans and Tomcat
Java WebService connected to Database
How to Deploy a Java Web Service
Call a webservice in Java
Java WebService - Create your first web service in Java
package javax.jws does not exist
Getting Started with Android
HTML5 Location - getCurrentPosition() in HTML5
HTML5 Canvas - Using Canvas in HTML5
HTML5 - Introduction
HTML5 Video - Handling video in HTML5

More Tutorials in Perl
Steps to Install perl-Apache-DBI in linux
Extract filename from full path using perl
Flush history file on disk (unique hosts reach flush limit of 20000) - Awstats
What is Perl?
History of Perl?
Why was it named Perl?
Major features of Perl
The design of Perl
Perl Applications
Implementation of Perl
Perl for Windows
Perl6 - The future of Perl
POST to URL from Perl Script

More Latest News
Most Viewed Articles (in Perl )
Major features of Perl
Steps to Install perl-Apache-DBI in linux
History of Perl?
POST to URL from Perl Script
Flush history file on disk (unique hosts reach flush limit of 20000) - Awstats
Perl Applications
Implementation of Perl
Perl for Windows
Extract filename from full path using perl
What is Perl?
Why was it named Perl?
The design of Perl
Perl6 - The future of Perl
Most Emailed Articles (in Perl)
Why was it named Perl?
Perl Applications
Implementation of Perl
Perl for Windows
POST to URL from Perl Script
What is Perl?
History of Perl?
Major features of Perl
The design of Perl
Perl6 - The future of Perl
Flush history file on disk (unique hosts reach flush limit of 20000) - Awstats
Extract filename from full path using perl
Steps to Install perl-Apache-DBI in linux