Warming up to Perl

This assignment is due 8 April, 1996.

Write a Perl 5 program that will take a Unix line printer accounting file in the following format

   1.00 alexander.cs.unca.edu:benites
   1.00 burnsville.cs.unca.edu:brock
   6.00 burnsville.cs.unca.edu:brock
   1.00 fairview.cs.unca.edu:hixsonm
   4.00 rosman.cs.unca.edu:mccrack
   4.00 rosman.cs.unca.edu:mccrack
   4.00 rosman.cs.unca.edu:mccrack
  26.00 burnsville.cs.unca.edu:brock
   3.00 brevard.cs.unca.edu:rodman
   2.00 brevard.cs.unca.edu:rodman
   4.00 brevard.cs.unca.edu:rodman
   4.00 hominy.cs.unca.edu:mccrack
   1.00 alexander.cs.unca.edu:benites
   1.00 alexander.cs.unca.edu:benites
   1.00 alexander.cs.unca.edu:benites

and produce an accounting summary formatted as follows

benites  printed   4 copies
brock    printed  33 copies
hixsonm  printed   1 copies
mccrack  printed  16 copies
rodman   printed   9 copies

The name of the input file will be passed as the only command line argument to your Perl script. The output of your script should be written to standard output. Your script should produce no other output other than the accounting summary.

This is not a hard script to write. I know one script that does the assignment that is only thirteen lines long and four of those lines only contain curly braces!

Return to the CSCI 373 homework index
Return to the CSCI 373 index
Return to Dean Brock's home page
UNCA CSCI logo Return to the UNCA Computer Science home page