use CGI 'param'; # use the CGI module, and import the function named "param" $email_to = param('extra_emails'); # this assumes that your text input is called "extra_emails"