bigcreeklinn has asked for the wisdom of the Perl Monks concerning the following question:
Thanks all, for your help. As an OLD unix type, I only thought of solving the problem in that domain. With your pointers, I learned just enough Applescript to call perl from a Folder Action. I have only done "date >>/tmp/timestame" so far, but that proves the process. I also will try to load and use the IO::Kqueue package. That looks like just the ticket for a perl-only approach.
Again, thanks.
--Linn
------------------------------
Greetings. On my Mac OS X machine, I would like to drag a file to a folder and as it is dropped in, to wake up my perl script. My first attempt was to create a named pipe and have my script waiting on an open function. This worked great for something like cat somefile >mynamedpipe but unfortunately, the application I wanted to export from would not write to the pipe. It needed to delete it and write a normal file.
So now I am looking at alternatives. It would be easy to modify the script to process some file that has been written or dropped into a directory, but I would like to control it with something more elegant than polling the directory on a sleep timer. I searched somewhat throught CPAN but didn't see anything initially. Any ideas? Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to do a blocking readdir or similar
by BorgCopyeditor (Friar) on Dec 19, 2005 at 03:31 UTC | |
Re: How to do a blocking readdir or similar
by merlyn (Sage) on Dec 19, 2005 at 03:12 UTC | |
by saintmike (Vicar) on Dec 19, 2005 at 04:08 UTC | |
by Kanji (Parson) on Dec 19, 2005 at 06:25 UTC | |
by james2vegas (Chaplain) on Aug 24, 2009 at 07:38 UTC | |
by GrandFather (Saint) on Dec 19, 2005 at 03:27 UTC | |
by brian_d_foy (Abbot) on Dec 19, 2005 at 13:26 UTC | |
Re: How to do a blocking readdir or similar
by john_oshea (Priest) on Dec 19, 2005 at 11:48 UTC | |
Re: How to do a blocking readdir or similar
by aquarium (Curate) on Dec 19, 2005 at 13:03 UTC |
Back to
Seekers of Perl Wisdom