Just a small suggestion, but if you leave the check for a replace argument out of the following code:
unless ($phash{find} && $phash{replace}){
so
unless ($phash{find}){
Then you can also do a find Delete.
Also as a side note, in windows, the find argument appears to be always preprocessed for octal binary codes, regardless of the state of the -a switch. I can't however find a reason, although the code looks secure.
if ($phash{ascii}){
$phash{find}=&asciicode($phash{find});
$phash{replace}=&asciicode($phash{replace});
}
Regards,
Dermot