radio buttons with in a perl script (69 Views)
Occasional Contributor
Posts: 8
Registered: ‎09-16-2005
Message 1 of 3 (69 Views)

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:


#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,
-values=>['Show Payment Files ','MOVEGENTS','MOVECRAS','Run date Batch Job','Pre-Load','Show Approved Files'],
if ($radio_action eq "Show Payment Files")
system "/batch/scripts/showpay"
print end_html;

I keep getting the same error below -->

syntax error at ./ line 19, near ")
Execution of ./ aborted due to compilation errors.
Valued Contributor
Posts: 107
Registered: ‎06-23-2005
Message 2 of 3 (69 Views)

Re: radio buttons with in a perl script

Your system line in the if block needs a ; on the end.
Honored Contributor
Posts: 6,190
Registered: ‎10-13-1997
Message 3 of 3 (69 Views)

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.




should work

Enjoy, Have FUN! H.Merijn [ knowing nothing on CGI, and wants to keep it that way ]
Enjoy, Have FUN! H.Merijn
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.