#!/usr/bin/perl use CGI; my $q = new CGI; print $q->redirect(-location => "http://redirected_url"); system 'perl /path/to/script.pl inputfile.txt'; #### Status: 302 Moved location: http://redirected_url ---- there is a blank line here, as there should be ---