If the second receiving script can accept variables
using the "get" method then you might be able to
use location to redirect the browser to the next script.
my $anotherpage = 'http://www.domain.com/cgi-bin/script.pl';
my $passeddata = "?var1=$data1&var2=$data2";
.... # fixup $passeddata for proper sending
print "Location: $anotherpage$passeddata\n\n";
When using Location is needs to be the first element print.
Also your data will need to be fixedup so that it will pass correctly.
I use the following. I'm quoting it here only to indicate the direction to take
and hoping someone will post a more proper conversion. I can't speak for this being
complete. It just works in a limited situation I'm using.
$passeddata =~ s/([!@#$%^&()_+\n])/sprintf("%%%02x",ord($1))/eg;
$passeddata =~ s/\s/+/g;
This kind of solution might work okay for simple confirmation screens, etc.
I'm not too hot on its use for passing large amounts of data and it's certainly not that secure.
Claude
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.