use constant CFGDIR=>'/config/' in my main script #### Then tried to refer to it from module1.pm, $c = main::CFGDIR #### my constant CFGDIR=>'/config/' our constant CFGDIR=>'/config/'