in reply to Problem with loops

What do you expect this to do?

for ($input eq "end")

for takes a list of values. $input eq "end" is an expression; for will loop over whatever that expression produces.


Improve your skills with Modern Perl: the free book.

Replies are listed 'Best First'.
Re^2: Problem with loops
by Anonymous Monk on Nov 26, 2011 at 00:49 UTC
    well I am trying to create it so after the first time the user enters the name and address the program presents the menu again so that they can add print delete or whatever. I thought a loop was needed a second time to know when to get out, is their something else I should be doing?
      Certainly you'll need a loop, but if you want the menu to be shown repeatedly, you have to print it inside the loop.