S
still me
I am trying to write a cgi that calls (POSTs to) another cgi. The
second cgi returns a web page (HTML). I can't seem to figure out how
to get to the data that the second cgi sends back. The cgi runs, the
POST works, but i don't know how to access the return output from the
second cgi (so I can pass it back to the browser that made the initial
call).
Here's the (very trimmed) code of the first program:
#!/usr/bin/perl -w
use strict;
use CGI qwall);
use CGI::Carp qw(fatalsToBrowser);
use LWP;
my $browser = LWP::UserAgent->new;
my $url = 'http://www.example.com/cgi-bin/second.pl';
my $response = $browser->post( $url,
[ 'ed' => '001',
'test' => 'it worked',
]
);
# and right here I want to forward the data to the calling browser
Thanks
second cgi returns a web page (HTML). I can't seem to figure out how
to get to the data that the second cgi sends back. The cgi runs, the
POST works, but i don't know how to access the return output from the
second cgi (so I can pass it back to the browser that made the initial
call).
Here's the (very trimmed) code of the first program:
#!/usr/bin/perl -w
use strict;
use CGI qwall);
use CGI::Carp qw(fatalsToBrowser);
use LWP;
my $browser = LWP::UserAgent->new;
my $url = 'http://www.example.com/cgi-bin/second.pl';
my $response = $browser->post( $url,
[ 'ed' => '001',
'test' => 'it worked',
]
);
# and right here I want to forward the data to the calling browser
Thanks