#!/usr/bin/perl
use CGI;
$q = CGI->new;
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
# how do I copy the cookies passed to this script to the UserAgent so I can pass them to $url?
my $result = $ua->post($url, \%PostData );
if ($result->is_success) {
# how do I copy the cookies returned from $url back to my user?
print "Content-Type: text/html\n\n";
print $result->decoded_content;
}
ASKER
ASKER
Perl is a high-level, general-purpose, interpreted, dynamic programming languages with over 25 years of development. Perl 5 runs on over 100 platforms from portables to mainframes and is suitable for both rapid prototyping and large-scale development projects. Perl gained widespread popularity as a Common Gateway Interface (CGI) scripting language, in part due to its regular expression and string parsing abilities. In addition to CGI, Perl is used for graphics programming, system administration, network programming, finance, bioinformatics, and other applications.
TRUSTED BY
I too don't like using hidden fields so, Instead you should be using server side sessions .
CGI::Session
or
Data::Session
On an unrelated note, you should ALWAYS include the warnings and strict pragmas in EVERY perl script and while testing/debugging cgi scripts, you should include the CGI::Carp module..
Open in new window