I have tried using a HERE doc but the Perl coding shows up on the HTML page.
If I'm understanding this correctly, then note that you can't just stick Perl code into an HTML file. You need to write a Perl script that outputs HTML, and the web server needs to support executing that Perl script, and you need to set it up properly for the Perl script to be executed. Depending on your web hosting provider this can often be easy, but sometimes requires a few steps. I recommend you look at whatever documentation your web hosting provider has for information on running CGI scripts, or if you can't find enough information, contact their support. There are also resources like the CGI Programming Tutorials on this site.
Update: Hmm, re-reading your question, maybe what you have instead looks something like this?
#!/usr/bin/perl use warnings; use strict; use CGI; # ... perl code ... print <<END_HERE_DOC; <select name="blah"> # ... perl code in here doc ... </select> END_HERE_DOC # ... perl code ...
If so, then you probably just need to get a hang of interpolating things correctly, and Corion's advice applies: show us your code (How do I post a question effectively?), reduced down to as little as possible to reproduce the problem (Short, Self-Contained, Correct Example), and also consider using something like Template::Toolkit.
In reply to Re: incorporate HTML coding in a Perl program (updated)
by haukex
in thread incorporate HTML coding in a Perl program
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |