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


1 Very convenient for text output is "here" document:
2 print FILEHANDLE <<EOF;
3 <html>
4 <head><title>$title</title></head>
5 <body bgcolor="$bgcolor">
6 <h1>$title</h1>
7 </body></html>
8 EOF
9 Here EOF is an arbitary string to denote end of data
10 Note that variables are interpolated in this syntax which is equivalent to a "" form which is less clear!
11 print FILEHANDLE "<html>\n<head><title>$title</title></head>\n"; # etc.

in Table To:


© 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