http://qs1969.pair.com?node_id=781992


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

Replies are listed 'Best First'.
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.