Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: how to permanently monitor a directory

by cfreak (Chaplain)
on Aug 14, 2003 at 13:21 UTC ( [id://283860]=note: print w/replies, xml ) Need Help??


in reply to how to permanently monitor a directory

I don't really see anything wrong with what you have, the only thing I can suggest is you could eliminate a line by using scalar
if(scalar(@Dircontent) > 2) { # do stuff }
Lobster Aliens Are attacking the world!

Replies are listed 'Best First'.
Re: Re: how to permanently monitor a directory
by waswas-fng (Curate) on Aug 14, 2003 at 13:31 UTC
    Of course, if someone copies a file there and is still dropping it while your loop runs in the cycle you may see issues with truncating data. You should also build in tests to see if the file is done being written to. I assume you are moving the file to proccess it not just to move it.

    -Waswas

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-24 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found