I have this nested foreach loop
foreach $one (@one) { foreach $two (@two) { $one =~ m/\(.\)(.+)\(.\)/; if ($two eq $1) { push @result, $one; } } }
I need the script to go to the parent foreach loop when $two eq $1, I've tried putting next in the if but it just goes to the next field in the child foreach.
Thanks.
Desmond
In reply to using next in a nested foreach() by sandrider
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |