in reply to using next in a nested foreach()
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'
|
|---|