if ( $text eq param('password') ) { print redirect( 'http://www.domain.com/cgi-bin/xml_final/viewdb.pl?username=' . param('username') ); } else { print header, start_html( -title => 'Not so much correct with that login', -style => {-src => '../..//xml_final/db.css'} ), h1('Incorrect password'), p({-align => 'center'}, a({-href => 'login.pl'}, 'Try Agian?') ), end_html; } exit; # no reason to continue processing if the browser is moving on