in reply to Re^7: Testing scripts
in thread Testing scripts

In short, throw away the whole routine and just use CGI instead. It will be a good, tested routine to deparse a query string into its parameters and it can even return you a hash (what your instructors seem to be calling an "associative array", which is a term used by those raised in Perl4, or awk+sed) should you want so.