in reply to pause/wait command?

As an alternative to sleeping if you are on Linux (or indeed Irix) with FAM installed - you might consider using SGI::FAM which will allow your program to get events when the contents of a directory changes:

use SGI::FAM; my $fam=new SGI::FAM; $fam->monitor('foo'); while (1) { my $event=$fam->next_event; # Blocks print "Pathname: ", $event->filename, " Event: ", $event->type, "\n"; }
This will report every time a new file is created in the 'foo' directory.

/J\

Replies are listed 'Best First'.
Re^2: pause/wait command?
by demerphq (Chancellor) on Jul 28, 2004 at 17:30 UTC

    Looks like there is a nice opportunity to do a File::ChangeNotify that presents a unified interface to Win32::ChangeNotify and SGI::FAM (which has got to be one the worst module names i've seen in ages.)


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi