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:
About a while loop

 



Graeme
Novice

Oct 22, 2000, 4:16 AM

Post #1 of 2 (458 views)
About a while loop Can't Post

I have never been sure about this so i thought i would just ask here

open(links, "$sitedata/file.db");
while(<links> ) {
}

does that bit of code have to have the
close(links);
on it like this

open(links, "$sitedata/waitinglinks.db");
while(<links> ) {
}
close(links);


japhy
Enthusiast

Oct 22, 2000, 4:32 AM

Post #2 of 2 (458 views)
Re: About a while loop [In reply to] Can't Post

It IS considered good style to close any filehandles you open, if that's what you're asking.

------------------
Jeff "japhy" Pinyan -- accomplished author, consultant, hacker, and teacher


 
 


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

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