On 4/2/02 4:22 PM, Octavian Rasnita <[EMAIL PROTECTED]> wrote:

> Hi all,

Hi Teddy,

> I want to make a Perl script and I want to include an HTML file in a certain
> place in it.

First, I assume you mean you want the contents of an HTML file to be
included in your script's output.

> I would also like to be able to include a web page from other sites and a
> text file also.

In all these cases, you'd simply open a file and print its contents. I.e.,

    open(FILE,"<file/path.html");
    while(<FILE>){
        print;
    }
    close(FILE);

As for the text files, you'll probably want to include their contents in
<pre> tags, and convert chars that have special significance to HTML (", <,
>, and &, especially) to their corresponding HTML entities.

Remember, CGI scripts are no different than command-line scripts, and HTML
files are no different than plain-text files. In both cases, the format and
use are simply different.

hth,
-- 
Michael


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to