Of course, in your case, $c is still holding carangaBoomBANG!, so your grep will still find it.
And there are also many other ways in which a value can be copied around, for example, when the memory for the string part of a scalar has to be reallocated in a different region, the old, now unused memory is not cleared in any way.
In short, I don't see much hope for you to erase "sensitive" data from memory within Perl unless you can confine the handling to very short places and control every step of handling.
Personally, I would rely on the security features of the OS, especially that only the superuser (if at all) has read rights to /dev/mem, and no other script is run as the current user which could peek the sensitive data from memory.
In reply to Re: making perl more forgetting
by Corion
in thread making perl more forgetting
by ddzeko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |