Solved

Automatically submitting a form in Perl

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

18 Experts available now in Live!

Get 1:1 Help Now