It can be done as follows :
use CGI;
my $q = new CGI;
$CGI::HEADERS_ONCE = 1;
print $q->redirect(qq{newpage.html});
The thing we should care about this is we should not print anything in this page before the redirect code.
If anything prints here, then the redirect won’t work.