[roch-pm] [Fwd: perl using php headers]
Brian Mathis
bmathis at directedge.com
Sun Apr 15 17:58:49 CDT 2001
-----BEGIN PGP SIGNED MESSAGE-----
Bryan Dennstedt wrote:
> I know that in php, I can do something like
>
> <?
> virtual ('/cgi-bin/header.cgi');
> ?>
>
> But I'm looking for a little snippet that I can put into my perl
> files...
>
> I'm not the best at perl... but there should be something right? I've
> poured over the manuals and search engines for a little bit, but I cant
> find much.
>
> Any tips?
> -Bry
You could use the LWP modules from inside your cgi script. Here's the
most basic, probably all you need (right from 'lwpcook'):
use LWP::Simple;
$doc = get 'http://hostname/path/to/file.html';
then you can just use $doc. Note that the LWP stuff isn't installed by
default, so you probably have to install it:
perl -MCPAN -eshell
cpan> install Bundle::LWP
- --
Brian Mathis
Direct Edge
http://www.directedge.com
-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.3
iQEVAwUBOtonp7Go2cj8O3o1AQHxnQf/QtrB/2PmffWl8JQatW8x3cF6vRMPxvgj
g09j2TbTsumWGcJ2CU2vDLbXKars3r1gYMSyDnRQRr4UBo5cfokUMq2RKwohOwlJ
HtRC/hdiFlU9ud0l32v0t71RWOqmwqe9piqmmnRyx6FeqO+APKQqY9VT7Gf4XMXj
PL/ZOSDLK2hbF76khDeI9bc/HQEEqYeVluAEpMTaXnL6CTLhrkVYLwrjznBb1Luz
WaGcOiXEoPaBwAM7FbK4ujSBXLhUxzDsXPi9eR/Fz9Ix9gu1rVLL+Z3HUnHP+dVH
SF++kLuBE/wsqrNkMvBdOPz8s1zxGzqNW0aIKIAYVqfcyhdPFcZb4g==
=Pf4u
-----END PGP SIGNATURE-----
--
For information on unsubscribing from this list, please visit
http://rochester.pm.org
More information about the Rochester-pm
mailing list