由于你没有给出上下文和相关细节,我只能也朦胧地建议使用一些状态变量,在某些状态下跳过当前的迭代?有点儿状态机的味道了,呵呵,我们经常这么干 :)

Cheers,
-agentzh

On 7/14/09, Ericzhao82 <[email protected]> wrote:
> foreach $one () {
>         for () {
>                 foreach $two () {
>                         while () {
>                                 do sth;
>                         }
>                 }
>         }
> }
>
> 有4个嵌套循环,现在while后做的工作就出现重复了.
> 哪位能指点下,有没有更好的方法,或者如何去除错?谢谢
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。
 要在此论坛发帖,请发电子邮件到 [email protected]
 要退订此论坛,请发邮件至 [email protected]
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

回复