Basic HTML version of Foils prepared Sept 20 97

Foil 65 A Perl "Here" Document

From Tutorial on PERL Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


Very convenient for text output is "here" document:
print FILEHANDLE <<EOF;
<html>
<head><title>$title</title></head>
<body bgcolor="$bgcolor">
<h1>$title</h1>
</body></html>
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<head><title>$title</title></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 Sun Sep 21 1997