awohld has asked for the wisdom of the Perl Monks concerning the following question:
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; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: next'ing out of a "foreach" loop within a subroutine
by grinder (Bishop) on Oct 30, 2005 at 09:37 UTC | |
by sauoq (Abbot) on Oct 30, 2005 at 21:04 UTC | |
|
Re: next'ing out of a "foreach" loop within a subroutine
by pg (Canon) on Oct 30, 2005 at 03:59 UTC | |
by awohld (Hermit) on Oct 30, 2005 at 04:19 UTC | |
by pg (Canon) on Oct 30, 2005 at 04:30 UTC | |
by ysth (Canon) on Oct 30, 2005 at 05:56 UTC |