At or near the top of your app, before it executes anything sensitive, place the following code:
print "Cannot run as root!"
How to do this in PERL: …how-to-prevent-a-perl-script-from-running-as-root…
Did you find this post useful or have questions or comments? Please let me know!