?
Solved

Automatically submitting a form in Perl

Posted on 2004-03-21
1
Medium Priority
?
222 Views
Last Modified: 2013-12-25

I have a perl script that I am using to send an automated email when members register for our site.  I would like to add a function that sends a form of variables to a URL.  What would be the best way to do this?

Thanks in advance
-47
0
Comment
Question by:Agent47
1 Comment
 
LVL 48

Accepted Solution

by:
Tintin earned 200 total points
ID: 10646532
use LWP::UserAgent;
$ua = LWP::UserAgent->new;  

my $req = HTTP::Request->new(POST => 'http://www.perl.com/cgi-bin/BugGlimpse');

$req->content_type('application/x-www-form-urlencoded');
$req->content('match=www&errors=0');  

my $res = $ua->request($req);
print $res->as_string;
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question