package MyProgram::Config; use FindBin; sub GetConfig { return { pathToScript => $FindBin::Bin, xyz => 30, # ... }; } # GetConfig