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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|