{\rtf1\ansi\deff0\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman{\*\falt Thorndale};}{\f1\froman\fprq2\fcharset0 Times New Roman{\*\falt Thorndale};}{\f2\froman\fprq2\fcharset0 Times New Roman;}{\f3\fnil\fprq2\fcharset0 HG Mincho Light J;}{\f4\fnil\fprq2\fcharset0 Arial Unicode MS;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\snext1 Default;}
{\s2\cf1{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\sbasedon1\snext2 Header;}
{\*\cs4\cf1\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033 Numbering Symbols;}
}
{\info{\author Sharon Tuttle}{\creatim\yr2003\mo4\dy7\hr0\min50}{\operator Sharon Tuttle}{\revtim\yr2003\mo4\dy21\hr9\min51}{\printim\yr2003\mo4\dy21\hr9\min51}{\comment StarWriter}{\vern6410}}\deftab1250
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\headery0{\*\headeryb283\headerxl0\headerxr0\headeryh0}{\header \pard\plain \s2\cf1{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\ltrch\loch\f2\fs16 {\ltrch\loch\f2 CIS 180 - Intro to Perl\tab \tab p. {\field{\*\fldinst \\page}{\fldrslt 1}}}
\par {\ltrch\loch\f2 Homework #5}
\par }
\pgdscnxt0 Default;}}
\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn2135\margbsxn1440\headery1440{\header \pard\plain \s2\cf1{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\ltrch\loch\f2\fs16 {\ltrch\loch\f2 CIS 180 - Intro to Perl\tab \tab p. {\field{\*\fldinst \\page}{\fldrslt 1}}}
\par {\ltrch\loch\f2 Homework #5}
\par }
\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\qc\ltrch\loch\f2\b {\ltrch\loch\f2 CIS 180 L - Section 4 - Intro to Perl}
\par {\ltrch\loch\f2 Homework #5 - Due 10:00 am on Monday, April 28th}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\ltrch\loch\f2\b 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435{\ltrch\loch\f2{\f2{\b 1.\tab }{\b0 Now that you know about invocation arguments, write a program that expects a file name as an invocation/command line argument --- it should use {\b while} and the diamond operator{\b  <> }to keep track of how many times each line in the file appears. It should th
en print out the line(s) that appeared most frequently (there could be a tie, after all, with 3 lines appearing 45 times), along with how many times they appeared, in whatever pleasing format that you wish. (What should you do if there is no file given? Or
, if the file given has no lines? Make a reasonable decision, and implement that...)}}}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2\b {\ltrch\loch\f2 2.\tab {\b0 Write a program that asks for dollar amounts from the user (entered as plain numbers!). It should average the numbers entered, and print the averaged result to two decimal places with a $ sign in front. (If no values are entered, print that no average w
as computed.)}}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par {\ltrch\loch\f2{\b 3. \tab {\b0 Remember creating a hash to hold menu items and their prices? Now do so, but now create the hash from a file given as an invocation argument, where each line is expected to contain a menu item and price (without a $!), and your Perl program will print 
out the hash results }}{\b0 so that the menu items are in ASCII order, with prices on the right lined up nicely (with the help of}{\b  printf{\b0 ), now matter how much the menu items names vary (but we'll assume all fit on 1 line each...!)} }}
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435{\ltrch\loch\f2{\f2{\b0 E-mail your three Perl programs to }{\b st10@humboldt.edu}{\b0  by 10:00 am on Monday, }}}
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 {\ltrch\loch\f2 April 28th. }
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435{\*\tlswg8236}\tx615 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li405\ri0\fi-435 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li855\ri0\fi-435\ltrch\loch\f2 
\par 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li1275\ri0\fi-435\ltrch\loch\f2\b 
\par \pard\plain \s1\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af4\afs24\lang255\ltrch\dbch\af3\afs24\langfe255\loch\f0\fs24\lang1033\li420\ri0\fi-435\ltrch\loch\f2 
\par }