When I'm running it and hit a value of "10" I get a message saying "Exiting subroutine via next"foreach $row (@array) { &routine($row); } sub routine { if ($row != '10') { print "stuff"; } else { next; } }
In reply to next'ing out of a "foreach" loop within a subroutine by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |