Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to display text in IE?

by Parham (Friar)
on Jul 12, 2002 at 14:37 UTC ( #181280=note: print w/ replies, xml ) Need Help??


in reply to How to display text in IE?

i would probably go with what the other monks suggested, but here's something simple as well. I'll assume that your text file is just that, a simple text file with line returns. to output it, try this:

print "Content-type: text/html\n\n"; print <<"EOF"; <HTML> <HEAD> <TITLE>textfile</TITLE> </HEAD> <BODY> <PRE> $textfile </PRE> </BODY> </HTML> EOF exit;
note the 'pre' tags in there. \n's at the end of lines are actually processed within those so your text file will output the way you want it to :).


Comment on Re: How to display text in IE?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (17)
As of 2015-07-02 17:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls