1 #!/usr/bin/perl -w
2 # File: print_format.pl
3 # Author: Tom Large - tlarge@thelug.org
4 # Location: http://www.thelug.org/docs/
5 # Description: Demonstrates how to use a form in perl.
6
7 $one = "Variable One";
8 $two = "Good";
9 $three = "Variable Three";
10 $four = "Good";
11 $five = "Variable Five";
12 $six = "Bad";
13 $seven = "Variable Seven";
14 $eight = "Good";
15 $nine = "Variable Nine";
16 $ten = "Bad";
17
18 # Generate the form we will use for our pretty output.
19 format STDOUT =
20 ************* **************** ******
21 Process Name Current Process Status
22 ************* **************** ******
23 First Row @<<<<<<<<<<<<<<< @<<<<<
24 $one, $two
25 Second Row @<<<<<<<<<<<<<<< @<<<<<
26 $three, $four
27 Third Row @<<<<<<<<<<<<<<< @<<<<<
28 $five, $six
29 Fourth Row @<<<<<<<<<<<<<<< @<<<<<
30 $seven, $eight
31 Fifth Row @<<<<<<<<<<<<<<< @<<<<<
32 $nine, $ten
33 ************* **************** ******
34 .
35
36 write (STDOUT);
syntax highlighted by Code2HTML, v. 0.9.1