Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Can I do Server-Side-Includes in Perl?

by transmission_err (Initiate)
on Nov 25, 2001 at 22:34 UTC ( #127399=note: print w/replies, xml ) Need Help??

in reply to Can I do Server-Side-Includes in Perl?

why do all that just open the html document you would have normally put in the include tag and print it out... ie.
open(B, "any.html"); while(<B>){ $line = $_; print $line; }
its simple, and very easy to understand.

Replies are listed 'Best First'.
Re: Answer: Can I do Server-Side-Includes in Perl?
by qslack (Scribe) on Nov 26, 2001 at 06:13 UTC
    open(FILE, "filename") or die "$!\n"; print while <FILE>;
    also works, and it's a bit more concise. You will want to change the die part for your specific application, but it's better than no error handling.

    Quinn Slack
    perl -e 's ssfhjok qupyrqs&&tr sfjkohpyuqrspitnrapj"hs&&eval&&s&&&'

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://127399]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-12-09 22:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found