s/$ref_srv/$server/i for my $path = $logfilepath;