>
> The problem is the angle brackets in the statement "<FILE>". EmbPerl
> translates them into HTML entities before passing the line off to Perl
> to process. You need to set $optRawInput=1 in a block prior to the one
> that contains your while statement. I usually make the following block
> the first one in my EmbPerl file if I'm going to be doing any file I/O.
>
> [- $optRawInput = 1 -]
>
Yes, you could also set this option in your httpd.conf file, so you don't
have to write it all the time. You should do this anyway if you are using an
normal text editor for writing your code.
The other possibility is to do what a html editor would do, change your code
to <FILE> and last but nor least \<FILE> works also. Read the FAQ about
escaping and the section "inside Embperl" in the docs.
Gerald
> Regards,
> Bryan.
>
> --
> Bryan Thale
> Motorola Labs, Networking and Infrastructure Research
> mailto:thale@rsch.comm.mot.com
>
> Randy Nivales wrote:
>
> > this one didn't work... why?
> >
> > <html><head><title>test</title></head>
> > <body>
> >
> > [- open FILE, "/full/path/of/my/file"; -]
> > [$ while ($line = <FILE>) $]
> > [+ $line +]
> > [$ endwhile $]
> > [- close FILE; -]
> >
> > </body>
> > </html>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW:
http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------