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:
This will report every time a new file is created in the 'foo' directory.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"; }
/J\
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: pause/wait command?
by demerphq (Chancellor) on Jul 28, 2004 at 17:30 UTC |