A program that uses a value field that does formatting. : Field « Report « Perl






A program that uses a value field that does formatting.

   
#!/usr/local/bin/perl 

$string = "Here\nis a line of\ntext.\n"; 
$~ = "OUTLINE"; 
write; 

format OUTLINE = 
^<<<<<<<<<<<<<<<<<<<<<<<<<<< 
$string 

. 

   
    
    
  








Related examples in the same category

1.Format Field Types
2.Multiline fields
3.Split a long field over multiple lines
4.Field Designator Symbols
5.Field Display Symbols
6.Different types of fields
7.Writes a string using the multiline field format.
8.Using value fields to print output.
9.Valid value-field formats.
10.Limitations of the @* value field.