They should. $m has an undef value when the loop starts, which will evaluate to 0 in numerical context. When the $m++ operation happens, $m becomes one. Thus, the final loop will occur when $m has a value of 79, but it will be the 80th iteration. Or did you notice something else that I didn't?
-----Original Message----- From: LoBue, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 12:21 PM To: [EMAIL PROTECTED] Subject: RE: shrinking code Those don't necessarily do the same thing, do they?: > print "-" x 80; Prints 80 dashes. > > while($m < 80){ > > print "-"; > > $m++ > > } Prints some number of dashes, 80 or less, depending on the initial value of $m. This could be used in check printing software, etc. (Not that I'm offering a solution, just pointing out these may not be the same). -Mark -----Original Message----- From: Glenn Meyer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 9:26 PM To: Beginners" <[EMAIL PROTECTED]>"@glennmeyer.com Subject: Re: shrinking code Please, tell me what your are doing here. I have seen similar short code before but have no idea how to read it or why it works. Can you point me to docs or a boox the would help? Thanks! On Tuesday 09 April 2002 10:14 pm, Tanton Gibbs wrote: > print "-" x 80; > ----- Original Message ----- > From: "Michael Gargiullo" <[EMAIL PROTECTED]> > To: "Beginners" <[EMAIL PROTECTED]> > Sent: Tuesday, April 09, 2002 11:13 PM > Subject: shrinking code > > > How can I write this smaller? > > > > while($m < 80){ > > print "-"; > > $m++ > > } > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]