in reply to Persistent perl

here's another way to do it: Guide to a happier unix life - screen

  1. start a screen named "dirmonitor"

    bash$ screen -S dirmonitor
  2. you are now inside screen; start your program

    bash$ ./dirmonitor.pl
  3. press CTRL-a d to detache the screen (your program now runs in the background inside screen)

  4. reattach the screen named "dirmonitor"

    bash$ screen -r dirmonitor
:)))))