in reply to Re^2: cgi error output
in thread cgi error output

What kind of error do you mean?

Maybe you want to learn about how to output HTML in parts? Maybe a templating system is useful to separate the HTML you generate from your Perl code?

Maybe you want to just

if( $errorMessage ) { print $errorMessage; }

... in the right place?