Indentation would help readability in an enormous way.
It's not clear why you're calling use vars for some simple globals. You can probably just declare them with my as usual, unless you are using them in other modules, which is a scary thought anyway. Maybe that is
where error_page() lives? Try passing this data as arguments, such as error_page("eins","zwei")
Don't call your subroutines with ampersand, such as &foo, but with brackets, such as foo(). Ampersand is a Perl 4 thing and is slightly dangerous because of how it can work in Perl 5.
Each time through your @$data loop you are reassigning to $res. Maybe you meant to append, such as $res .= "@$_";
It's not clear what you expect $_ to be at the end of your program.
Comment on Re: Why does my db query return nothing?
Thank you all - after some nice guys have tested my script on THEIR server, I can say it functions !!! The drag is that my Server (where my Homepage is) didn't have "mysql"-driver installed - so, of course, there is no connection to the corresponding mysql-table. I spent one week into finding it out. Maybe one week more to convince the server of installing the thing... it's just a matter of time, I guess.