in reply to uninitialized value in concatenation

Before building the email message, check all variables and perform appropriate actions if they aren't set or don't have suitable values. Those actions might be to call an error handling routine, output a warning message, supply a default value and so on.

You might also consider building the components of the message separately. For instance:

if ($email_400) { my $problem_description = $ENV{REDIRECT_URL} ? "A request was received for the file $ENV{REDIRECT_URL}, whi +ch does not exist." : "A file request was received but no filename was supplied."; send_mail(... ... $problem_description ... EOF

-- Ken

Replies are listed 'Best First'.
Re^2: uninitialized value in concatenation
by Galceran (Initiate) on Nov 16, 2010 at 21:47 UTC
    Thanks for those two responses. I shall have to carry on tomorrow pm Gilbert