This is greatly simplified - I hope it makes sense. :)
I am trying to loop over rows of an array doing a test. If the test fails, I want to go all the way back to the outer loop, which the documentation suggests will work only with foreach.
#!/usr/bin/perl -w use strict; my @x = ( ['aaaaa', 'bbbbb', 'ccccc', 'ddddd',], ['eeeee', 'fffff', 'ggggg', 'hhhhh',], ['iiiii', 'jjjjj', 'kkkkk', 'lllll',], ); for my $i (1 .. 1000) { for my $a (@x) { my $ifails = 0; for my $j (0 .. (scalar @$a) - 1 ) { <get external data string for pattern matching here, put i +n $c> if ($c =~ /$a->[$j]/) { $ifails++; } } if ($ifails > 1) { want to go to outer loop here, and not proc +ess the next (and subsequent) row(s) } } }
Is there some way of doing that? Note that in the actual application, I do have more more processing below the inner loop, so a "last" statement at the test doesn't work.
Thank you in advance.
In reply to returning to the outer loop by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |