Exercise: A Formatted Report

A task that comes up inevitably when you're dealing with computers is formatting raw data into a report. Computer programs exchange data in formats that are difficult for humans to read, and a common task is taking that data and formatting it into a human-friendly report.

For this exercise, you're given a set of employee records that contain information about some mythical employees, including hourly wages, number of hours worked, names, and employee numbers. The exercise takes that data and reformats it into a nice report.

You can easily modify this same kind of program to print other kinds of reports. The data for the exercise is contained within an array initialized at the beginning of the program. In a real report, ...

Get Sams Teach Yourself Perl in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.