in reply to hiding passwords

how about using ulimit to instruct the program to not core dump?
$ ulimit -c 0 $ perl script.pl

but anyway, all this is useless, because somebody able to send signals to the process would also be able to attach a monitor (i.e., strace or truss) and inspect all the IO including the passwords.