Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: Performance Trap - Opening/Closing Files Inside a Loop

by Ven'Tatsu (Deacon)
on Dec 10, 2004 at 16:47 UTC ( #413905=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # if EXPR is false $foo will still have the last set value for this sc
    +ope's (but not other scope's) $foo
    my $foo if EXPR; 
    
    #same here if EXPR is false the first time it's tested on this pass.
    my $bar while EXPR;
    
  2. or download this
    while (my $foo = <$fh>) {
        #do something
    ...
    while (my ($key, $value) = each %hash) {
        #do other things
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://413905]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-09-28 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (124 votes). Check out past polls.

    Notices?