in reply to If statement based on Radio Button Values

That is not perl code...

if (...){ .... } elsif (...){ ... }

...is a proper if/else if statement. Also, in perl5, variables aren't objects (except in certain situations), and they certainly can't have methods called on them in that way.

It would be prudent to show us the error message(s). I doubt the following will fix your problem, but this code is at least proper Perl:

my $subject; if ($businessCall eq "Yes_bus"){ $subject = "Branch Manager Business Call"; } elsif ($businessCall eq "No_bus"){ $subject = "Merchant Referral"; }

Replies are listed 'Best First'.
Re^2: If statement based on Radio Button Values
by jaacmmason (Acolyte) on Nov 04, 2015 at 22:42 UTC
    The message received is as follows:

    Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. More information about this error may be available in the server error log.

    The message is generic. Not having my statement in Perl, is not a shocker to me. I am still new and still learning the ins and outs of formatting in Perl. Thanks for the note - I will try to research a bit more, as the small amount of changes I made in reference to your IF example still produced the same result.
      More information about this error may be available in the server error log.

      That's the big hint. If you look in the server error log as the message suggests you will likely find the real problem (which is probably that your code doesn't compile given the snippet above).

      To get a more helpful error message put this line up near the top of your script:
      use CGI::Carp('fatalsToBrowser');