1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#!/usr/local/bin/perl use warnings; use 5.012; use utf8; use CGI; my $cgi = CGI->new(); print $cgi->header( -charset => 'UTF-8' ); print $cgi->start_html( -style => { -type => 'text/css', -code => { body { margin:0; padding:0; /*background-color: #0080c0;*/ } #con_1 { position: relative; height: 300px; } } } ); print $cgi->p( { -id => "con_1" }, 'Hello World' ); print $cgi->end_html; # Quantifier follows nothing in regex; marked by <-- HERE # in m/* <-- HERE background-color: #0080c0;*/ at ./so.cgi line 16.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/usr/local/bin/perl use warnings; use 5.012; use utf8; use CGI; my $cgi = CGI->new(); my $css=<<EOCSS; body { margin:0; padding:0; /*background-color: #0080c0;*/ } con_1 { position: relative; height: 300px; } EOCSS print $cgi->header( -charset => 'UTF-8' ); print $cgi->start_html( -style => { -type => 'text/css', -code => $css, } ); print $cgi->p( { -id => "con_1" }, 'Hello World' ); print $cgi->end_html;