in reply to I love perl but....
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:
The local and {} make the code cleaner, it works even without them.open INCL, "path_to_include_file"; { local $/ = undef; print <INCL>; } close INCL;
On unix, you can also use the following shorthand:
Hope this helps,print `cat path_to_include_file`;
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 |