Solved

Automatically submitting a form in Perl

Posted on 2004-03-21
1
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
The viewer will learn how to dynamically set the form action using jQuery.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

690 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