As you'll probably find out, asking for help with homework isn't looked on too favorably here
I think that what is frowned upon not only here, but probably also in any (online) Perl community is not "asking for help with homework" as much as one's asking people to do homework for him/her, especially without explicitly saying so. But sierrastar has asked for advice wrt homework, clearly stating so. In this case I think it won't be any problem giving that help...
| [reply] |
thank you for your input...I know you probably get asked for homework help all the time. I do want to do it myself otherwise I won't be able to go on with the rest of the book. I just feel like this program was a big jump from the chapter 6 homework
in answer to your questions:
2) is the loop something that occurs a set number of times, or should it keep occurring until a given condition changes?
the loop of user input keeps occuring - thru every loop (enter product name, enter quantity and price) the user is asked if they want to enter another product - when they answer "no" is when you leave the loop and invoke a subroutine to process the data
Thanks so much monks...I do appreciate your time
sierra
| [reply] |
| [reply] |
user_wants_to_continue is 'yes'
while ( user_wants_to_continue is not 'no' ) {
prompt for and get product_name
prompt for and get quantity
prompt for and get price
store product_name in array
store product_name, quantity, price in hash
prompt for and get user_wants_to_continue
}
| [reply] |