To do it right, you need a patch to perl's Perl_sv_clear to wipe the PV buffer, and you need to make sure you don't keep any pads around longer than necessary (by freeing the code that used them). Even so, you are only shortening the window that sensitive data is accessible via /dev/mem. If it's all that sensitive, it's hard to see how that could be good enough.