#!/bin/perl
# File: unpackex

# Unpack the records in the 'salarys' file.

open(SALARYS, 'salarys') || die "Can't open salarys:$!\n";

while ($record = <SALARYS>) {
   ($salary, $first, $last) = unpack("L A15 A15", $record);
   print "$first $last makes $salary dollars a year!\n";
}
close(SALARYS);
