> Date: Sat, 17 Jun 2000 14:46:58 +1000
> From: George Vieira <[EMAIL PROTECTED]>
> Subject: [SLUG] Perl script help
> 
> Hi all,
> 
> I'm fiddling with a perl script (signup.cgi) which I require to call another
> script (counter.cgi).
> I am not a Perl programmer and I am not sure how to call another CGI within
> one.
> I tried using a variable to retrieve the output of the counter.cgi and then
> display further down the script but I get gooberish.
> 
> This is a snippet of what I have got at the moment... (warning alot of
> playing around done here)
> 
> (signup.cgi)
> - ------------------
> require("/home/httpd/cgi-bin/cgi-lib.pl") || die "require cgi-lib.pl died";
> $count=("/home/httpd/cgi-bin/counter.cgi domain=www.mydomain.com.au
> page=sign 
> up visible=true")
> 
> print "We have had $count visits to this page.";
> - ------------------

Not sure if this has been explained already but...
$count=`/home/httpd/cgi-bin/counter.cgi domain=www.mydomain.com.au`
This is just like in shell, the backticks are used to get the output
rather than the other quotes.
It's also worth running the counter.cgi from the shell to see what it
outputs.
$ cd /home/httpd/cgi-bin
$ counter.cgi domain=www.mydomain.com.au

You might find that what counter.cgi returns is in fact an image and
not text at all?? I forget the syntax but you might need something in
the vein of this...
print "We have had <inline img>$count</inline> visitors";

---<GRiP>---
Grant Parnell [EMAIL PROTECTED] ([EMAIL PROTECTED]) 
Ph: 02-8701-4564 Mob: 0408-686-201 Web: http://www.poboxes.com/gripz
No Microsoft products were used in the production of this message.

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to