in reply to Syntax errors with {s
This looks like a CGI. The technique of building up an error string and reporting it if present may be of use:
my $errstr = ''; for my $param( qw( name email phone url requests ) ) { $errstr .= "Please enter your $param<br>\n" unless defined param($ +param); } # if $errstr is true we have some errors, so tell user if ( $errstr ) { print "Content-Type: text/html\n\n"; print "<p>Please click back and correct these error(s):\n<p>" . $e +rrstr; exit 0; } # got data OK so continue processing
cheers
tachyon
|
|---|