in reply to I love perl but....

I guess we share our love ;-).

Embedding perl in html can be done, but the reverse is more versatile. Generate HTML with perl! Look at CGI and the Template toolkit for convenient methods.

Including is no problem at all. Example:

open INCL, "path_to_include_file"; { local $/ = undef; print <INCL>; } close INCL;
The local and {} make the code cleaner, it works even without them.

On unix, you can also use the following shorthand:

print `cat path_to_include_file`;
Hope this helps,

Jeroen
"We are not alone"(FZ)
Fixed error. See Why or why not? - local undef $/

Replies are listed 'Best First'.
Re: Re: I love perl but....
by japhy (Canon) on May 22, 2001 at 19:49 UTC