My solution already does exactly that. Just replace the body of if ($@) with whatever you want.
What you have there is the same as
eval ("use fakemodule;"); if ($@) { print "error happened $@"; } else { print "error didnt happen, do some stuff"; } print "Content-type: text/html\n\n"; print "here we go again..."; &a; sub a {}
In reply to Re^3: Why am I getting "premature end of script header"?
by ikegami
in thread Why am I getting "premature end of script header"?
by lokiloki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |