i have inserted a program below.
as seen below, some statements use semicolons and some use commas, there seems to be no definite rule to follow, can anyone enlighten me on this? thanks...
Code:
1 #!/usr/bin/perl
2 use strict;
3 use CGI':standard';
4 if(param)
5 {
6 my $entry=param('entry');
7 print header(),
8 start_html("Program 7b"),
9 #ignorecomment1
10 #ignorecomment2
11 h3("result is "),
12 `$entry`,
13 end_html();
14 }
15 else
16 {
17 print header(),
18 start_html("Program 7b"),
19 start_form(),
20 print ("Enter a valid unix command");
21 hr(),
22 textfield(-name=>'entry'),
23 submit(-value=>'submit now'),
24 end_form(),
25 end_html();
26 }
as seen below, some statements use semicolons and some use commas, there seems to be no definite rule to follow, can anyone enlighten me on this? thanks...
Code:
1 #!/usr/bin/perl
2 use strict;
3 use CGI':standard';
4 if(param)
5 {
6 my $entry=param('entry');
7 print header(),
8 start_html("Program 7b"),
9 #ignorecomment1
10 #ignorecomment2
11 h3("result is "),
12 `$entry`,
13 end_html();
14 }
15 else
16 {
17 print header(),
18 start_html("Program 7b"),
19 start_form(),
20 print ("Enter a valid unix command");
21 hr(),
22 textfield(-name=>'entry'),
23 submit(-value=>'submit now'),
24 end_form(),
25 end_html();
26 }