Above line simply calls a Perl file that uses CGI.pm "redirect" function to redirect the browser to the desired page.
That won't work because CGI.pm's redirect() prints out HTTP headers to redirect the client. But you've already printed out HTTP headers, so the redirect headers will be included in the text rendered by the browser. So the user will see:
Status: 302 Moved