in reply to Passing data via URL in include

you could provide us more information about what kind of error occured... you can find that in the logs of your web server.

does your CGI program work as expected ? when run like http://localhost/cgi-bin/das_counter.pl?ilikepie do you get anything in $ENV{QUERY_STRING} ?

assuming you're using Apache, you should try something like this:
<!--#include virtual="/cgi-bin/das_counter.pl?ilikepie" -->
"if you need to pass additional arguments to a CGI program, using the query string, this cannot be done with exec cgi, but can be done with include virtual" ( Apache mod_include )

also, you'd better be using the CGI module so you don't have to mess around with (low-level) stuff like processing the QUERY_STRING.

:)))))