Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: how to force HTML to display as text

by Chrisf (Friar)
on Jan 24, 2002 at 16:04 UTC ( [id://141194]=note: print w/replies, xml ) Need Help??


in reply to how to force HTML to display as text

TAAFWWTDI - There's always a far worse way to do it...
#!/usr/bin/perl -wT use strict; print "Content-type: text/html\n\n"; print <<HEADER; <html> <head> <title>My HTML</title> </head> <body> <p>Here's the HTML:</p> <textarea cols="50" rows="20"> HEADER open HTML, "<data.html" or die "Can't open data.html: $!"; while (<HTML>) { print $_; } close HTML; print <<FOOTER; </textarea> </body> </html> FOOTER

That works in some browsers, doesn't work in others.

p.s. Make sure to follow grep's suggestion about code tags ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-25 09:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found