Lab Exercises

Please note: you must complete and demo this!!!! This COUNTS!!!!!

Program 1)
Ask the user to input a filename. You program should output the basename and the extension.

For example, the following would represent a sample run:

$ ./parseFile.pl
Please enter filename:  myfile.txt                          <----user enters myfile.txt
Basename : myfile    Extension: txt                      <---- program output. Note no period!!!!
Please enter filename: yourfile.long_extension    <---- loop and ask again
Basename : yourfile    Extension: long_expression
Please enter filename: testCase                             <---- loop again. Note NO extension
Basename : testCase   Extension:
Please enter filename :


Program 2) Using Hashes !!!!
Write a perl program that will create an %amountDue hash. The key values will correspond to
student E numbers. Have the program prompt 5 times for an E number and an amount due.
After inputting all data, output the hash using a foreach loop and the keys operator.