in reply to next within one subroutine that looks to another subroutine
foreach(1,2,3) { next if ($_ == 2); print "next: $_\n"; } foreach(1,2,3) { last if ($_ == 2); print "last: $_\n"; } __RESULTS__ next: 1 next: 3 last: 1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: next within one subroutine that looks to another subroutine
by dragonchild (Archbishop) on Feb 13, 2002 at 19:44 UTC |