Thanks -- that should work. Now, I'm having more problems.
I would like to call a CGI script, and have %udat be available to it. I thought the way to do that was: Embperl::Req::SetupSession($req_rec); Execute({subreq => '/cgi-perl/env_test.pl?param1=...¶m2=...'}); and then in thescript.pl I would put: %udat = Embperl::Req::GetSession($req_rec); However, this results in the following error: [Fri Jun 03 15:17:39 2005] [error] Can't locate auto/Embperl/CurrReq.al in @INC(@INC contains: /usr/local/apps/warreng/htdocs/warreng/ /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.6.1/i386-linux /usr/lib/perl5/vendor_perl/5.6.1 /usr/lib/perl5/vendor_perl . /usr/local/apps/warreng) at /usr/lib/perl5/site_perl/5.6.1/i386-linux/Embperl.pm line 350[Fri Jun 03 15:17:39 2005] [error] [7152]ERR: 500: env_test.pl(1): Error (no description) 500 (status=200) /cgi-perl/warreng/env_test.pl~~ and in fact CurrReq.al doesn't exist anywhere in the /usr/lib/perl5 tree. -------- So another way would be to use Execute({inputfile => "/absolute/path/to/script", syntax => 'Perl'}) but since it's a CGI script with lots of parameters, including cookies set by other people, I don't know how to make that work. ---------- I may have to fall back on using %udat in the calling script and then getting the EMBPERL_UID by parsing the headers, and then manually grepping the session file (e.g. /tmp/0bbff30336fd9dead9d8543e80372de5) for the values I want but that's definitely a hack. I'm pretty sure method 1 is the cleanest way. Any help is very appreciated. Good luck with moving, Gerald. Thanks everyone. Allen On Fri, Jun 03, 2005 at 02:15:57PM +0200, Gerald Richter wrote: > > ----------------------- > > /usr/local/apache2/cgi-perl/warreng/header_test.pl: > > > > #!/usr/bin/perl > > print 'allen'; > > Should be > > print OUT 'allen' ; > > Or you have to put a > > select(OUT) ; > > At the top of your script. > > > > > Finally, I added the line: > > > > select((select(STDOUT), $| = 1)[0]); > > > > in header_test.pl. > > > > Now, 'allen' is printed *before* 'output:' is printed. > > > > That's because STDOUT goes directly to the client, while OUT goes via > Embperl. > > Gerald > -- happy random snippet from Allen Haim reviewing Allen Haim: Since he insists on playing only his own mediocre original tunes, audiences are assured of hearing nearly the exact same show every time. [more at http://www.netherrealm.net/~allen/songs] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]