I think in addition, you have a typo $datofbirth when you meant $dateofbirthon line 24, be careful to check that you get the results you are expecting too from $title and $body since you declare them local in your subs but are also using them in your global
Also, when I use the CGI module, I find it much easier to: