Hi,

I have a requirement to read each of the files from a directory and pass
each one of them as a parameter to my perl script one by one. The
requirement is such that my perl script should keep running in the
background and it should take each of the files as they enter into the
target directory, pass that as a parameter to my perl script, process it and
write the output to a different directory.

Ex:-   $cd success
         success>$ls
         success>file1  file2  file3  file4  file5

         $cd
         home>perl test.pl /home/success/file1
         home>perl test.pl /home/success/file2
         ...
         ...

Please suggest how to go about this. Are there any perl modules to scan
through a directory and pick each of the files to process.

Once the file is taken from the input directory and processed and output
written to a different output directory, I can delete that file from the
input directory.

Thanks,
Mihir

Reply via email to