MinniePerl
Technical User
I'm obviously desperate. I'm taking a course that covers "Perl 5 by Example" in two weeks and it's just not sinking in. I can't get the simple homework assignments to work and I don't have a lot of time to spend on this.
Here it is:
Create Perl script that does the following:
1)Usues a Function to ask the user for keyboard input needed to create a standard array that holds inventory data for a business. The user should be able to continue entering data until they choose to end the Data Input. The data should include the following information:
Item Name
Item Price
Number of Items
2)Uses a second Function to calculate the Total Value of each Inventory item entered in the first Function. That Total Value should be Returned to the main program and added to the array line that has that item's other information. Then print the whole array line to the screen. Each print will only be for one line item at a time.
Sample output: ITEM Quantity Price Total
Onions 20 $.50 $10.00
3)Use only private variables in both functions
That's it. Please reply
Here it is:
Create Perl script that does the following:
1)Usues a Function to ask the user for keyboard input needed to create a standard array that holds inventory data for a business. The user should be able to continue entering data until they choose to end the Data Input. The data should include the following information:
Item Name
Item Price
Number of Items
2)Uses a second Function to calculate the Total Value of each Inventory item entered in the first Function. That Total Value should be Returned to the main program and added to the array line that has that item's other information. Then print the whole array line to the screen. Each print will only be for one line item at a time.
Sample output: ITEM Quantity Price Total
Onions 20 $.50 $10.00
3)Use only private variables in both functions
That's it. Please reply