#!/usr/bin/perl -w use strict; my @employee = qw(ID FNAME LNAME TITLE E-Mail); my $format = "%-5s %-10s %-10s %-18s %s\n"; my %employee = ( '1087' => [ qw( Anatoliy Urbanskiy 77 ana@yahoo.com ) ], '1032' => [ qw( Frederik Amstrong 12 fred@earthlink.net ) ], '1112' => [ qw( Ivan Mazepa 10 ivan@hotmail.com ) ], ); my %descriptor = ( FNAME => '0', LNAME => '1', TITLE => '2', EMAIL => '3', ); my %title = ( 1 => 'COO', 10 => 'COT', 12 => 'Manager', 77 => 'Software engineer', ); printf($format,@employee); print "=" x 65, "\n"; for ( keys %employee ) { printf($format, $_, $employee{$_}[ $descriptor{'FNAME'} ], $employee{$_}[$descriptor{'LNAME'}], $title{$employee{$_}[ $descriptor{'TITLE'} ]}, $employee{$_}[ $descriptor{'EMAIL'} ] ); } # ID FNAME LNAME TITLE E-Mail # ================================================================= # 1032 Frederik Amstrong Manager fred@earthlink.net # 1087 Anatoliy Urbanskiy Software engineer ana@yahoo.com # 1112 Ivan Mazepa COT ivan@hotmail.com # What is unusual in this program? # 1. Static hashes %employee and %title. # The data should be stored in some DATABASE. # ( Here I use it for visual method ). # 2. Using printf function instead of a HTML table. Next Step