Everyone else has already told you to use CGI.pm and I agree. However, you want to know why your script doesn't print "Gelukt om in die kut-sub te komen," right? That's simple - you don't initialize $naam anywhere in your code. Do a search and you'll see that the if() is the first mention of the variable. The code above puts the form variables in the hash %formdata. Maybe you meant if($formdata{naam})?