june_bo has asked for the wisdom of the Perl Monks concerning the following question:
I use a global flag. If a change is made in the function, the flag is set to one and I know to repeat the iteration. Here's the code (ignore the %seen, it help me avoid unwanted recursion):
# Call the Find_First function while($repeat_flag){ $repeat_flag = 0; %SEEN = (); # reset hash while(($k, $v) = each %GRAMMAR) { &Find_First($k, $v); } }
Like I said, this works fine. But can I make it more, well, you know...
Thanks,
-tl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help - I'm a C programmer
by Masem (Monsignor) on Jun 17, 2001 at 16:22 UTC | |
by clintp (Curate) on Jun 17, 2001 at 19:59 UTC | |
by Masem (Monsignor) on Jun 17, 2001 at 21:08 UTC | |
by tilly (Archbishop) on Jun 18, 2001 at 19:29 UTC | |
by John M. Dlugosz (Monsignor) on Jun 18, 2001 at 05:14 UTC | |
by Brovnik (Hermit) on Jun 17, 2001 at 22:55 UTC | |
by Sifmole (Chaplain) on Jun 18, 2001 at 16:21 UTC | |
by june_bo (Novice) on Jun 18, 2001 at 00:42 UTC | |
by marcink (Monk) on Jun 18, 2001 at 00:51 UTC | |
|
Re: Help - I'm a C programmer
by VSarkiss (Monsignor) on Jun 17, 2001 at 21:05 UTC |