$f{CopyRef} =~ s/\W/ sprintf '-%02x', ord($&) /ge;
open I, ">$dir/public/nr-$f{CopyRef}.txt" or die $!;
print I $message or die $!;
$f{CopyRef} =~ s/\W/ sprintf '-%02x', ord($&) /ge;
open I, ">$dir/public/nr-$f{CopyRef}.txt" or die $!;
print I $message or die $!;