Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PRINT 1

Status
Not open for further replies.

damann

Technical User
Jul 19, 2000
114
US
Hello,

I need help with a simple print problem...

Im trying to use perl to print some HTML to the browser, so I do this...

print "
HTML stuff and perl variables are here
.
.
.
";

This will work but I have to go through and backslash all of the double quotes in the HTML. There are a lof of double quotes there.

So I was wondering if there was any other way that I can print the entire document without backslashing all the double quotes?

I heard of a print <<EOF, but I dont know if I'm getting the syntax for that correct...

Please help
 
Code:
print <<EndPrint;
    <HTML><HEAD><TITLE>Title here</TITLE></HEAD>
    <BODY>
    <P>page content here</P>
    </BODY>
    </HTML>
EndPrint

You can use any tag after the '<<' to start and end the print statement. The ending tag must be the only thing on it's line, otherwise it will not be recognized as the ending tag for the print <<..... statement.

HTH


keep the rudder amid ship and beware the odd typo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top