in reply to calling a html file from a perl script

yes... something like...
my $file; if(case1) { $file = 'this.html'; } elsif(case2) { $file = 'that.html'; } else { $file = 'error.html'; } print "Content-Type: text/html\n\n"; { open(HTML, $file) or die $!; local $/; # this will make <HTML> just return the # whole file instead of line by line print <HTML>; close HTML; }

                - Ant

Replies are listed 'Best First'.
Re: Re: calling a html file from a perl script
by I0 (Priest) on Jul 21, 2001 at 09:32 UTC
    You don't need the local $/;
      Yes you do, unless you put the print in a while loop.

                      - Ant

        You don't need to put the print in a while loop.
        print <HTML>;reads in list context