open (PP, ">/home/abc/filename.txt") or die $!; print pp $string; close PP;