use File::Spec; use Readonly; use vars qw( $DataPath ); .... Readonly::Scalar $DataPath => File::Spec->catdir( $FindBin::Bin, 'data' );