I have Perl code behind a web server, and I combined that Perl script with pure HTML. The important part looks like this:
#!/usr/local/bin/perl
use strict;
use warnings;
print "Content-type: text/html\n\n";
print <<ENDHTML;
<!DOCTYPE html>
<html lang="hu">
<head>
...
</head>
<body class="landing">
...
<section class="feature 6u$ 12u$(small)">
<h3 class="title">some title</h3>
<p>some text</p>
</section>
...
</body>
</html>
ENDHTML
When somebody opens the web page, this error message will appear in logs:
2022/06/27 13:28:44 [error] 7811#100158: *106 FastCGI sent in stderr: "Use of uninitialized value $12 in concatenation (.) or string at /path/to/file/index.pl line 78.
I know this is because of use warnings;
, and if I disable it, then nothing will appear in the log. But, it would be nice if I could ignore the part of script from print <<ENDHTML;
to ENDHTML
because they are part of the HTML code. Is there a way to make this happen and I can also use warnings;
?