Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: HTML::Template and filehandle ?

by davorg (Chancellor)
on Jul 21, 2009 at 15:25 UTC ( #781992=note: print w/ replies, xml ) Need Help??


in reply to HTML::Template and filehandle ?

As far as I can tell there isn't an HTML method/tag to include external text files like this.

Server side includes, perhaps?

You are creating a HTML::Template variable called FILE. And that contains the contents of the Perl variable $ioref. And that contains a filehandle. So you shouldn't really be surprised if you get the filehandle printed out instead of the contents of the file. If you want the contents of the file, then you'll need to read the file.

$template->param(FILE => do { local $/; <FH> });
--

See the Copyright notice on my home node.

Perl training courses


Comment on Re: HTML::Template and filehandle ?
Download Code
Re^2: HTML::Template and filehandle ?
by gctaylor1 (Hermit) on Jul 22, 2009 at 00:18 UTC
    Thanks daveorg!

    That works as advertised. It doesn't look like I want it to look but that's a topic for another node.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://781992]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2014-07-30 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls