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. |