Thank you very much, I think this is exactly what I need.
please let me know what you mean by "using lexically scoped file handles". You mean out of scope of sub myOpen()?
What I am doing is I am calling Script3.pl from Script2.pl from Script1.pl and files are opened inside Script3.pl. So does it mean that I have to open files in external Script1.pl?
Am I right that files will not be cached any more once I stop external script?