Re: while and do

2002-04-12 Thread Teresa Raymond
Thanks to all... >Some useful perl control structures: > >do { statements; } while someexpression; >do { statements; } until someexpression; >while (someexpression) { statements; } --or-- statement while >someexpression; >until (someexpression) { statements; } --or-- statement until >someexpressi

Re: while and do

2002-04-11 Thread Bryan R Harris
gt; of course, you could do: open(INFILE,"myfile.txt"); for () { # do something with $_ } but, that isn't going to help understanding :) > -Original Message----- > From: drieux [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 11, 2002 12:25 PM > To: [EMAIL PR

RE: while and do

2002-04-11 Thread Timothy Johnson
Good catch. That's what I meant, alright. -Original Message- From: bob ackerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 2:34 PM To: Timothy Johnson Cc: [EMAIL PROTECTED] Subject: Re: while and do On Thursday, April 11, 2002, at 01:17 PM, Timothy Johnson

Re: while and do

2002-04-11 Thread bob ackerman
FILE,"myfile.txt"); for () { # do something with $_ } but, that isn't going to help understanding :) > -Original Message----- > From: drieux [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 11, 2002 12:25 PM > To: [EMAIL PROTECTED] > Subject: Re: whi

RE: while and do

2002-04-11 Thread Timothy Johnson
e. I learned this lesson the hard way. -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 12:25 PM To: [EMAIL PROTECTED] Subject: Re: while and do On Thursday, April 11, 2002, at 12:02 , Teresa Raymond wrote: > Could someone explain the while

Re: while and do

2002-04-11 Thread John W. Krahn
Teresa Raymond wrote: > > Could someone explain the while and do w/ couple of examples? I have > yet to use them, only using the foreach loop and if else stmts. Have you read the perlsyn document? John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: while and do

2002-04-11 Thread drieux
On Thursday, April 11, 2002, at 12:02 , Teresa Raymond wrote: > Could someone explain the while and do w/ couple of examples? I have yet > to use them, only using the foreach loop and if else stmts. the obvious ones are while() { # bunch of stuff one wants to do with

RE: while and do

2002-04-11 Thread Nikola Janceski
while ($file = shift @build_line or $dir = shift @makedir){ # will do @build_line first then @makedir } # can't do that with foreach do{ # do this loop at least once regardless of the conditional at the end print "This time ", $n++," attempts.\n"; } until ($n >= 1);