Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Conditional statements in CGI/Div

by Khen1950fx (Canon)
on Jan 13, 2013 at 21:17 UTC ( #1013129=note: print w/replies, xml ) Need Help??


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; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013129]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2016-09-28 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (528 votes). Check out past polls.