use Config::File; $conf = Config::File->new( file => $file, path => $path ); print $conf->key;