How do I password protect a single perl script?

They have: 21 posts

Joined: Nov 2004

I have an editing script which I want to protect. It has several elements all of which are contained in one sub-routine. Is there a way to allow a single user to access the editor subroutine without having to re-write any of it's code?

I've tried having a password script which calls the sub-routine. It worked and brought up the editor, but when I tried to use it everything went back to the log-in. I'm not a Perl expert so have probably missed something incredibly simple - usually the case Smiling

They have: 14 posts

Joined: Oct 2004

You could place the script inside a directory and then password protect the directory.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.