Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

radio buttons with in a perl script

Highlighted
Stephen_175
Occasional Contributor

radio buttons with in a perl script

I m writing this script and I 've encountered
a problem in executing the radio button action in my perl script:

#!/usr/local/bin/perl

#use strict;
use DBI;
use CGI ":all";
$radio_action = param("radio_action");
$option = param("option");
print header, start_form,
start_html("Payment Load Information"),
h1("Payment Load Information");
print textfield(-name=>'option'), " option", br;
print submit('Option');

print br, "Select a criterion of search: ", br,
radio_group(-name=>"radio_action",
-values=>['Show Payment Files ','MOVEGENTS','MOVECRAS','Run date Batch Job','Pre-Load','Show Approved Files'],
-default=>'1',-override=>1),
if ($radio_action eq "Show Payment Files")
{
system "/batch/scripts/showpay"
}
print end_html;
submit,
end_form;
hr;

I keep getting the same error below -->

syntax error at ./payment_load_copy.pl line 19, near ")
{"
Execution of ./payment_load_copy.pl aborted due to compilation errors.
2 REPLIES
Pat Lieberg
Valued Contributor

Re: radio buttons with in a perl script

Your system line in the if block needs a ; on the end.
H.Merijn Brand (procura
Honored Contributor

Re: radio buttons with in a perl script

No, it does not. a semi-colon is optional before a closing brace.

the problem is the trailing comma on the line before the if. That line has no trailing semi-colon.

,-override=>1),

=>

,-override=>1);

should work

Enjoy, Have FUN! H.Merijn [ knowing nothing on CGI, and wants to keep it that way ]
Enjoy, Have FUN! H.Merijn