RE: Alternative to while ()

2010-09-30 Thread Ken Slater
-Original Message- >From: Owen Chavez [mailto:owen.chavez314...@gmail.com] >Sent: Thursday, September 30, 2010 2:41 AM >To: beginners@perl.org >Subject: Alternative to while () > >Hey y'all, > >I suspect that I'm struggling with something that has a *re

Re: Alternative to while ()

2010-09-29 Thread Uri Guttman
> "OC" == Owen Chavez writes: OC> while () { OC> if ($input = 'this') { OC> # Do some things. OC> last; OC> } OC> elsif ($input = 'that') { OC> # Do some other things. OC>last; OC> } OC> else { OC>

Alternative to while ()

2010-09-29 Thread Owen Chavez
Hey y'all, I suspect that I'm struggling with something that has a *really* straightforward alternative, but I don't do a lot of programming in perl (or any other language, really), and I can't see it. I've got a block of code that I'd like to run in a loop until a user enters some desired input.