in reply to __DIE__ easy CGI question
When the die is called, the eval block will exit and $@ will be set to "3". If there is no error, then $@ will be set to the empty string.eval { $sqlquery = "SOME UPDATE STATEMENT"; my $newsth = $dbh->prepare($sqlquery); $newsth->execute or die "3"; }; print $query->redirect(-location=>"$redirecturl?error=$@") if $@;
|
|---|