for (my @stack = keys %links; $#stack>=0; ) { my $current = shift @stack; next if $links{$current}{visited}; if (something_happens()) { push @stack, "another key"; } }
Courage, the Cowardly Dog
In reply to Re: Re: Re: Creating loop on undefined hash key value
by Courage
in thread Creating loop on undefined hash key value
by S_Shrum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |