CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [kwatts59] Problem with condition statement: Edit Log



FishMonger
Veteran / Moderator

Dec 12, 2012, 11:32 AM


Views: 673
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)


Edit Log:
Post edited by FishMonger (Veteran) on Dec 12, 2012, 11:32 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives