in reply to Embedding fuction output
Use the "print <<" construct for ONLY the static html and then call your functions directly. If you indent the different prints at different levels, it will be really easy to pick out which ones are which.sub foo { return "some output from foo\n"; } print <<' EOPAGE'; some stuff some more stuff EOPAGE print foo(); print <<' EOPAGE'; yet more stuff EOPAGE
An alternate solution to consider is using one of the html template systems. This would be some work to convert your existing code over, but it could be worth it.
I'm going to go out on a limb and bet that you're wanting your code to look something like:
so that all your html is in one place and your code in another right? Check out http://www.cpan.org/modules/by-module/HTML/HTML-Template-2.2.readme-------------------------------------- #!/usr/bin/perl Here's all my perl code where I set my variables and do my logic print <<EOP; here's all my html where I put in my $vars and @foos EOP ---------------------------------------
/\/\averick
|
|---|