in reply to while 's 'continue' block

continue blocks can be used to express a for loop in terms of a while loop
it can also be used to express the -p command line switch

Replies are listed 'Best First'.
Re: Re: while 's 'continue' block
by coreolyn (Parson) on Jan 04, 2001 at 21:59 UTC

    I'm falling a little short of understanding how you're using the term 'express', but the -p switch is very cool!

    coreolyn
      quoth the 1st Camel, on pg. 96, and the 2nd Camel, on pg. 99: <it>
      for ($I = 1; $i < 10; $i++) { ... }
      is the same as
      $i = 1; while( $i < 10) { ... } continue { $i++; }
      Personally, I like the symmetry it gives the language.
      (if only it had an elswhile clause to complete the symmetry...)

        An elsewhile would add symmetry but wouldn't a meanwhile be more fun?:)

        Thanks for the follow-up,

        coreolyn