thekestrel has asked for the wisdom of the Perl Monks concerning the following question:
<a href="www.mysite.com?thing={VALUE}">click me</a>
Thanks for the advice,#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; user LWP::Debug qw (+); #Simplified a little bit as real site requires cookies and url redirec +tion etc... my $ua = LWP::UserAgent->new; my site = "https://www.secure.com/login"; my $req = HTTP::Request->new(POST => $site); my $req->content_type('application/x-www-form-urlencoded'); my $req->content('user=a_user&pass=a_pass'); my $req = $ua->request($req); if ($res->is_success) { print $res->content; } else { print $res->status_line, "\n"; } #Now how do I dump the var=value pairs from this returned page???
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Environment Variable Question
by davidrw (Prior) on Jun 01, 2005 at 18:16 UTC | |
Re: Environment Variable Question
by NetWallah (Canon) on Jun 01, 2005 at 18:10 UTC | |
by thekestrel (Friar) on Jun 01, 2005 at 19:12 UTC | |
by NetWallah (Canon) on Jun 02, 2005 at 02:18 UTC | |
Re: Environment Variable Question
by tlm (Prior) on Jun 01, 2005 at 18:17 UTC | |
Re: Environment Variable Question
by dynamo (Chaplain) on Jun 01, 2005 at 18:11 UTC |