Solved

Automatically submitting a form in Perl

Posted on 2004-03-21
1
170 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 50 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

759 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now