RatArsed has asked for the wisdom of the Perl Monks concerning the following question:
Ideally, for clarity, I'd like to remove the need for the local variables, and just chuck a reference to the fuction into the flow.my $tnav = CONF::topnav(); my $bnav = CONF::botnav(); print <<EOPAGE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:/ +/www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Wibble</title> </head> <body> $tnav <h1 class="header">Wibble</h1> <p>This is purely demo</p> </body> </html> EOPAGE ;
So, does Perl provide me with the construct to do this? Am I being completely stupid today?
NB Before anyone gets on to me with "why aren't you using CGI.pm?"; please don't, we have our reasons for not using it for output...
--
RatArsed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Embedding fuction output
by mirod (Canon) on Jun 11, 2001 at 17:53 UTC | |
by Hofmator (Curate) on Jun 11, 2001 at 18:10 UTC | |
by bwana147 (Pilgrim) on Jun 11, 2001 at 19:31 UTC | |
|
Re: Embedding fuction output
by Odud (Pilgrim) on Jun 11, 2001 at 18:54 UTC | |
|
Re: Embedding fuction output
by mattr (Curate) on Jun 11, 2001 at 19:05 UTC | |
|
Re: Embedding fuction output
by maverick (Curate) on Jun 12, 2001 at 02:28 UTC |