Writes a string using the multiline field format. : Field « Report « Perl






Writes a string using the multiline field format.

   
#!/usr/local/bin/perl 

@input = <STDIN>; 
$string = join("", @input); 
$~ = "MULTILINE"; 
write; 

format MULTILINE = 
****** contents of the input file: ****** 
@* 
$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.Using value fields to print output.
8.Valid value-field formats.
9.Limitations of the @* value field.
10.A program that uses a value field that does formatting.