my $url = 'http://' . $username . ':' . $password '@' . 'www.example.com/some_page.html'; print $cgi->redirect($url);