
FishMonger
Veteran
Dec 12, 2012, 11:32 AM
Views: 343
|
|
Re: [kwatts59] Problem with condition statement
|
|
|
The code snippet you posted never increments $nohits_pos so using that var doesn't make any sense and isn't needed. You can simply use the 'last' function when you need to exit out of the loop prior to the end. See: perldoc -f last http://perldoc.perl.org/functions/last.html
(This post was edited by FishMonger on Dec 12, 2012, 11:32 AM)
|