in reply to Re: CGI from another script
in thread CGI from another script

i wrote a couple of test scripts before posting and they seemed to work fine without the ampersand...
tmp.pl
#!/usr/bin/perl use strict; use warnings; my $id = 1; my $auth_id = 150; my $blah = `perl ./tmp.cgi id=$id auth_id=$auth_id draw=1 raw=raw`; print $blah, "\n"; exit;
tmp.cgi
#!/usr/bin/perl use strict; use warnings; use CGI qw(:all); my $q = new CGI; my $id = $q->param("id"); my $auth_id = $q->param("auth_id"); my $draw = $q->param("draw"); my $raw = $q->param("raw"); print $id, "\n"; print $auth_id, "\n"; print $draw, "\n"; print $raw, "\n"; exit;
I wonder if it is because the first one was a perl script run from the command line rather than a cgi from the browser?
Update: I just updated my original script and the amp's arent helping either. But they do still work in the test script... hmmmm

Replies are listed 'Best First'.
Re^3: CGI from another script
by ww (Archbishop) on Sep 02, 2005 at 14:30 UTC
    ... or because the quoting (or OS) is different? Compare jeffa's -- which adds single quotes (which the op lacks) around the var list as well as the ampersand.
      yeah, i saw that and also tried it with quotes. doesnt seem to make a difference.
      I've investigated a bit more and it looks like the .cgi script i am calling from the first script, is getting the vars from the first scripts vars...
      Just about to do an update on my orig post for more info...