note
Your Mother
<p>Your style is all over the place and to do in such a sort space is something of an achievement. :P Please <c>use strict</c> and pick a CGI style. You are importing a ton of functions (":standard") but using it object oriented. There is almost never a reason to use it OOP in a standalone script; only if you need to pass it around libraries or harnesses.
</p>
<p>You can't just drop a post-fix conditional into a print list. You can use the Enterprise operator (see [id://564792]), among a couple other tricks though–</p>
<code>use strict;
use CGI ":standard";
my $index = param("index") || 0;
print header(),
start_html(),
div({ -id => "pagewrap" },
( p("Hello") ) x ! $index,
),
end_html();
</code>
1013116
1013116