in reply to Persistent perl

Detach your script from the terminal. Make it a daemon. Perhaps with Proc::Daemon.
Boris