Basic HTML version of Foils prepared March 30 97

Foil 62 The Perl EOF Syntax

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


Very Convenient for text output is syntax
print FILEHANDLE <<EOF;
<html>
<title>$title</title>
</head>
<body bgcolor="$bgcolor" >
<h1>$title</h1>
EOF
Here EOF is an arbitary string to denote end of data
Note that variables are interpolated in this syntax which is equivalent to a "" form which is less clear!
print FILEHANDLE "<html>\n<title>$title</title>\n</head>\n"; # etc.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Sep 6 1997