in reply to Keeping variable persistent
# Parent script $ENV{FOO} = "Hello, world\n"; # Child script print $ENV{FOO}; [download]
Instead learn how to write functions and libraries, and then learn why globals are officially a Bad Idea.