Use labels:
PARENT: foreach $one (@one) { foreach $two (@two) { $one =~ m/\(.\)(.+)\(.\)/; if ($two eq $1) { push @result, $one; next PARENT; } } }
Odd are, at least three other people will post the exact same thing before I hit 'create'
In reply to Re: using next in a nested foreach()
by jhourcle
in thread using next in a nested foreach()
by sandrider
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |