On Thu, Jun 27, 2013 at 10:20 PM, shawn wilson <ag4ve...@gmail.com> wrote:
> >... > > True. But, "do" should probably draw a more explicit caution in the docs > > since there are less tricky ways in most cases. > > > > However, there may be a few places when 'do' isn't always a don't :) > > > > 'do' might be a shorter, more readable idiom in the sense of "do > something > > until a condition occurs": > > > I can't agree with the either or here ... [snip] > > > perl -e 'do {$in =<>; ... } until $in =~ /q/' > > > > vs. > > > > perl -e 'while ( $in = <>; ... ) { ... last if $in =~ /q/}' > > > I find a combination of the two is most useful for quickly generating > reports: [...snip] > ... > Hm, this wasn't an argument for exclusive "either/or" usage at all. Rather I was making a case that "do" in limited cases could be a shorter and/or slightly clearer idiom. -- Charles DeRykus