in reply to
Conditional statements in CGI/Div
I condensed golux's script by 4 lines. Hopefully, this might be a little bit easier to read.
#!/usr/bin/perl -l
use strict;
use warnings;
use CGI qw/:standard/;
my $index = 0;
if($index == 0) {
my $cgi = new CGI;
print $cgi->header(),
$cgi->start_html(),
$cgi->div({-id => 'pagewrap'}, "Hello"),
$cgi->end_html();
}
Update: Condensed even more:
#!/usr/bin/perl -l
use strict;
use warnings;
use CGI qw/:standard/;
my $index = 0;
if($index == 0) {
my $cgi = CGI->new;
print header, start_html, div({-id=>'pagewrap'}, "Hello"), end_html;
}