Different types of fields : Field « Report « Perl






Different types of fields

   

#!/usr/bin/perl


use warnings;
use strict;

my $name = 'Tom';
my $streetAddress = '12 Avenue';
my $town = 'Gate';
my $state = 'CA';
my $zip = '11111-1111';
write();

$name = 'Jack';
$streetAddress = '12 Street';
$town = 'newTon';
$state = 'AC';
$zip = '00000-0000';
write();

$name = 'Mary';
$streetAddress = 'One City';
$town = 'Small';
$state = 'AQ';
$zip = '01234-5678';
write();

format STDOUT =
@||||||||||||||||||||||||||
$name       
@||||||||||||||||||||||||||
$streetAddress
@<<<<<<<<<<<, @< @>>>>>>>>>
$town,       $state, $zip

.

   
    
    
  








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.Writes a string using the multiline field format.
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.