in reply to Implement index.pl?something

Assuming index.pl is a CGI script, use CGI's param method to extract URI parameters. Then you can do whatever you want with it, including passing it as a parameter to SQL queries.