Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^7: Poorly written script

by amarquis (Curate)
on Feb 11, 2008 at 21:04 UTC ( [id://667450]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Poorly written script
in thread Poorly written script

Check for the files the same way you do now, just do it in the loop. Maybe something like:

while ($filehandle = get_next_file()) { ... }

So you spin off your "check if the file exists" and "open the file" code into a new function, and keep doing the loop while there are more files to find.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-16 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found